Idle connections in Mongodb

49 views
Skip to first unread message

viki vignesh

unread,
Oct 10, 2017, 9:52:29 PM10/10/17
to mongodb-user
Hi All,

As of now we have seen that lots of idle connections are sitting on MongoDB server.

Could anyone please  explain how to get the stats with timestamp and count of active connection and ideal connection.


Thanks in advance

Kevin Adistambha

unread,
Oct 17, 2017, 8:50:32 PM10/17/17
to mongodb-user

Hi

As of now we have seen that lots of idle connections are sitting on MongoDB server.

How did you discover that they are idling?

Could anyone please explain how to get the stats with timestamp and count of active connection and ideal connection.

I don’t believe such facilities is built into MongoDB. Perhaps you can determine those metrics by parsing the mongod log files using a custom script.

If you think that you have a lot of idle connections, you may want to customize the maxIdleTimeMS setting in the driver’s connection string URI in your application.

Best regards,
Kevin

Reply all
Reply to author
Forward
0 new messages