Huge amount of open connections - how to close them?

Hey all,

on our MongoDB Atlas Sandbox we experienced today a huge amount of open connections (about 80 connections in 10 minutes) of which we don’t know where they come from.

Even worse: We cannot close them and not even connect with mongo shell to analyse where they come from.

What can we do? Is there any way to force close some connections from the web interface or find out where they originate?


Hey @Simon_Hartmann

What tier of Atlas are you using. I remember when I upgraded my cluster from M2 to an M10 I got a shock at the default connections that the 3 nodes are using to communicate to each other (about 30 - 35 connections).
I have not seen it reach as high as 80. Have you implemented IP whitelisting in the Network access tab to prevent unauthorized connections.

With Atlas Free Tier, it doesn’t allow you to run db.currentOp() . So the one other way is to check the MongoDB log files for active connection IP Address.

2019-03-28T09:42:49.795-0700 I NETWORK  [listener] connection accepted from #1 (1 connection now open)

Click Download logs

Hope this has helped.

Hi Sean,

thanks for your help. We upgraded to M2 - and the connections went down.

However we still cannot see the logs in M2. So for now it seems we cannot explore the real reasons for the high connection count.