Too Many Open Files/Open Connections Issue for MongoDB

We recently ran into an issue where we have a single replica set Opening too many connections. On average, the number of connections hover around 50000. Each replica set uses 5k to 10k connections. However, this particular replica set immediately consume all of these and eventually crash the software. We can’t run it longer than 2 minutes before this happens. Any administration advice would be helpful. We are running 8 CPU, 32 GB RAM, VMs with 1 TB storage each. We have migrated the machine, rebooted, and restarted mongo.

ulimit -n is 64000 and ulimit -u is 64000. Right now we have maxNumberOfConnections set to 62000. This prevents the software from dying, but causes a host of connection problems since we are using all of the resources. We are using 7.0.16

Thanks

Hi, it is hard to say why that is happening without looking at the system in practice. I suggest you consider a consulting engagement with Percona

What’s the OS you are having