I've noticed connections count from 2 of the secondary nodes in a 3 node replica set reaching max connections allowed on primary and hence mongodb instance not responding for any queries and becomes stale.

Why is so many connections between replica nodes and how to prevent creating so many connections.

I tried increasing the ulimit but still its reaching to the increased value.

  • What's your current upper limit for the connections on each nodes? Are you properly closing the idle or unused connections from the application?
    – Jerry
    Oct 18, 2021 at 7:16


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.