简体   繁体   中英

Mongo connections overflow

We are running mongo 3.2 cluster on linux servers and we are having a problem dealing with too many connections. We checked and saw that the same machine opens alot of connections from inside cluster machines(not from other users) and doesnt close them all. The cluster was created by MMS manager using automation agent. After about 1K connections the mongo got too loaded and have low response. We succeeded solving it by restart the process on the problematic server, but we are looking for a long term solution to fix the connections problem:

  • How to close the connections without restart the process on the server?
  • How to prevent such situation of not closing the connections?
  • What can cause this?

Thank you.

1 & 2 - You can view the long running processes by using the currentOp() command and killing the long running processes using killOp() . This way your mongo server is still running and you get rid of the problematic connections

3- It is difficult to say what caused it without looking at your servers and your configuration. It could be a whole range things from a server querying your mongod server repeatedly to a server pinging your mongod infinitely

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM