Docker error: too many open files

2019-02-25 01:56发布

问题:

I got that error message when creating container.

Error response from daemon: too many open files

But I couldn't find any information about that error. (I saw https://github.com/docker/libcontainer/issues/211, but that was not the same problem of it.) Is there anyone who knows about it?

Thanks.

回答1:

Default limit of number of open files is 1024. You can increase it in two ways:

  1. Run the container with --ulimit parameter:

    docker run --ulimit nofile=5000:5000 <image-tag>
    
  2. Run the container with --privileged mode and execute ulimit -n 5000.

You can find more information here.



标签: docker