dataiotech Labs
dbaguidedbaguideDBAdataxtoolsdataopsphere
Home/Glossary/Connection Storm & File Descriptor
Connection Storm & File DescriptorSharding & High Availability

Connection Storm & Operating System File Descriptor Limits

Rapid influx of client sockets exhausting operating system file descriptors (ulimit -n) and spawning thousands of 1MB worker thread stacks, triggering memory exhaustion.

Internal Architecture Breakdown

Each incoming connection to mongod consumes an OS file descriptor and provisions dedicated thread memory buffers (~1MB stack). Under container restart waves without strict client pooling caps, thousands of concurrent sockets starve system RAM and exhaust file descriptors.

Hardening requires setting ulimit -n 64000 and sizing client pool minimums/maximums appropriately.

Production Inspection Queries

MongoDB
db.serverStatus().connections; // current, available, totalCreated