Search code examples
docker

Docker error: too many open files


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.


Solution

  • 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.