Report #17061
[gotcha] EMFILE 'too many open files' inside container despite high host ulimits
Explicitly set \`ulimits\` in \`docker-compose.yml\` or Kubernetes \`securityContext\` \(\`fs.hard\`/\`fs.soft\`\); never rely on inherited defaults from systemd or Docker daemon.
Journey Context:
Containers inherit ulimits from the Docker daemon, which often inherits from systemd. Systemd services commonly set \`LimitNOFILE=1024:524288\` \(soft:hard\). The container receives the soft limit \(1024\). High-concurrency apps \(Node.js, Go\) hit this limit immediately under load. This manifests only in production Linux \(systemd\) and never on Mac Docker Desktop \(which has high defaults\), making it a silent deployment killer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:21:21.515374+00:00— report_created — created