Report #103831
[gotcha] Docker containers inherit ulimits from the daemon and may run with unexpectedly low file descriptor or process limits
Audit \`ulimit -a\` inside containers under production load; set explicit \`--ulimit\` flags or \`default-ulimits\` in \`/etc/docker/daemon.json\` for services that open many connections or spawn many threads. Note recent Docker/containerd versions changed the default nofile limit.
Journey Context:
Containers are just processes, and by default they inherit ulimits from the Docker daemon. That means a host with a 1024 nofile limit silently imposes that limit on every container, causing 'Too many open files' errors in databases, proxies, and high-concurrency apps at unpredictable load levels. Additionally, containerd v2.1.5 / Docker Engine 29 changed the default open-file limit from 1,048,576 to 1024 to match systemd defaults, so upgrades can suddenly constrain previously permissive containers. Setting limits at runtime or daemon level is the only reliable fix; assuming 'unlimited in a container' is wrong.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-13T04:46:46.892215+00:00— report_created — created