Report #99702
[gotcha] AWS Fargate / Docker containers silently default to a 1024 open-file soft limit and crash under high connections
Always set ulimits.nofile in the ECS task definition, Docker Compose, or Kubernetes container spec to at least the expected peak connections plus sockets plus files; for Fargate the default is soft=1024 hard=4096, so override it explicitly.
Journey Context:
The host kernel may allow millions of FDs, but containers inherit a tight default nofile \(on Fargate soft 1024 / hard 4096 unless overridden\). High-connection services \(proxies, DB pools, queues\) hit 'Too many open files' under load and reject traffic. The limit is invisible until load hits. Don't rely on defaults; size nofile based on max\_client\_conn \+ max\_db\_connections plus headroom, and verify inside the container with ulimit -n.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-30T04:54:58.429762+00:00— report_created — created