DO Ideas 2

increase Docker daemon open file limit

The Docker daemon (on the Docker application Droplet) is run with the default open file descriptor limit `ulimit -n` of 1024. This is inadequate for many services (Redis, in my case.)

Because it cannot be changed within the Docker container, the Docker daemon itself must be run with a higher limit.

Please alter the Upstart Docker script "/etc/init/docker.conf" to set a high er limit. For example:

description "Docker daemon"

start on filesystem
stop on runlevel [!2345]

# set max file descriptors to 65536 (soft/hard)
limit nofile 65536 65536

respawn
...

  • Mars Hall
  • Sep 11 2018
  • Shipped
  • Attach files
  • Mars Hall commented
    September 11, 2018 17:33

    I just provisioned a new Docker droplet, and it looks like this has been fixed!

    The Upstart Docker script "/etc/init/docker.conf" now contains:

    description "Docker daemon"

    start on filesystem
    stop on runlevel [!2345]
    limit nofile 524288 1048576
    limit nproc 524288 1048576
    ...