diff --git a/contrib/init/openrc/docker.confd b/contrib/init/openrc/docker.confd index cc599e6da4..53bab813a9 100644 --- a/contrib/init/openrc/docker.confd +++ b/contrib/init/openrc/docker.confd @@ -17,7 +17,7 @@ #DOCKER_PIDFILE="/run/docker.pid" # Settings for process limits (ulimit) -#DOCKER_ULIMIT="-c unlimited -n 1048576 -u unlimited" +#DOCKER_ULIMIT="-c unlimited -n 524288 -u unlimited" # seconds to wait for sending SIGTERM and SIGKILL signals when stopping docker #DOCKER_RETRY="TERM/60/KILL/10" diff --git a/contrib/init/openrc/docker.initd b/contrib/init/openrc/docker.initd index 57defb8f57..61d8906f36 100644 --- a/contrib/init/openrc/docker.initd +++ b/contrib/init/openrc/docker.initd @@ -13,7 +13,7 @@ start_stop_daemon_args="--background \ extra_started_commands="reload" -rc_ulimit="${DOCKER_ULIMIT:--c unlimited -n 1048576 -u unlimited}" +rc_ulimit="${DOCKER_ULIMIT:--c unlimited -n 524288 -u unlimited}" retry="${DOCKER_RETRY:-TERM/60/KILL/10}" diff --git a/contrib/init/systemd/docker.service b/contrib/init/systemd/docker.service index 8275401b1a..d8c7867057 100644 --- a/contrib/init/systemd/docker.service +++ b/contrib/init/systemd/docker.service @@ -28,7 +28,6 @@ StartLimitInterval=60s # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting. -LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity diff --git a/contrib/init/sysvinit-debian/docker b/contrib/init/sysvinit-debian/docker index 24aa2ca99e..ee7883454a 100755 --- a/contrib/init/sysvinit-debian/docker +++ b/contrib/init/sysvinit-debian/docker @@ -58,7 +58,8 @@ case "$1" in touch "$DOCKER_LOGFILE" chgrp docker "$DOCKER_LOGFILE" - ulimit -n 1048576 + # Only set the hard limit (soft limit should remain as the system default of 1024): + ulimit -Hn 524288 # Having non-zero limits causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting.