-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.2.2
-
Component/s: MongoDB 3.2
-
Labels:
-
Environment:MAAS - MongoDB Atlas - ReplicaSet
Client:
SO - Ubuntu 14.04.3 LTS 64bits
Node - 4.4.3
mongodb module - v2.2.2
-
Empty show more show less
I have created a MongoDB Atlas deployment (replicaSet) with 3 nodes (1P, 2S), and I'm connecting to MongoDB from my node web app as explained here.
The problem is when my web app make a request (ex: a find) sometimes is created a new TCP connection others it reuses an existing one but TCP connections are never removed and it results in a lot of connections shown in mongoDB atlas metrics. ( it reached 225 connections in primary node )
I have read your FAQ Does TCP keepalive time affect MongoDB Deployments? and after that I changed that property to 120 (2 minutes) but the connections still not being removed.
Note:
1 - I am creating a singleton to access the DB only once in node web app.
2 - I cannot use the property maxIdleTimeMS because isn't available in nodeJS driver.
3 - This is also happening when I run node web app in windows 8.
Is this situation normal ? how can I make those connections be removed after completed ?
Regards
- is duplicated by
-
NODE-771 latest version (2.2.1) keeps piling up connections
- Closed