Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connections % of configured limit has gone above 80 from Mongo Atlas

Getting emails from Mongo Atlas that saying Connections % of configured limit has gone above 80.

Using M0 Sandbox tier which has 100 max connections.

Whether an upgrade to M2 tier (which has also 100 max connections) solve this?

like image 493
Ashwanth Madhav Avatar asked Jul 10 '19 11:07

Ashwanth Madhav


People also ask

What is connection limit in MongoDB Atlas?

Atlas reserves 10 connections per node. If you set your read preference to secondary, Atlas can read from the two secondary nodes for a combined 980 connection limit.

Why is MongoDB not connecting to Atlas?

Check that you are using the correct username and password for your database user, and that you are connecting to the correct database deployment. Check that you are specifying the correct authSource database in your connection string.

How many connections can MongoDB have?

In general, we recommend limiting collections to 10,000 per replica set. When users begin exceeding 10,000 collections, they typically see decreases in performance.


2 Answers

removing all IP address and waiting 5 minutes works also for me . seems like it kills all opened connections. Don't forget to allow your ip after that

see my cluster connections

there is an opened issue with mongoose. it might be the root cause https://github.com/Automattic/mongoose/issues/8059

like image 165
CocodyRockStar Avatar answered Nov 15 '22 15:11

CocodyRockStar


I resolved it by deleting all IP whitelist and wait for 5 minutes.

We can monitor that, the connections are decreasing in mongo atlas cluster. At last, it became Zero.

Then added IP whitelist from anywhere to access(Not secure. Just to work. Or whitelist current IP and server Ip).

Its work fine.

like image 24
Ashwanth Madhav Avatar answered Nov 15 '22 17:11

Ashwanth Madhav