简体   繁体   English

Mongo连接溢出

[英]Mongo connections overflow

We are running mongo 3.2 cluster on linux servers and we are having a problem dealing with too many connections. 我们在Linux服务器上运行mongo 3.2集群,并且在处理太多连接时遇到问题。 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. 该群集是由MMS管理器使用自动化代理创建的。 After about 1K connections the mongo got too loaded and have low response. 大约1K连接后,mongo负载太重,响应速度很慢。 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() . 1&2-您可以使用currentOp()命令查看长期运行的进程,并使用killOp()杀死长期运行的进程。 This way your mongo server is still running and you get rid of the problematic connections 这样,您的mongo服务器仍在运行,并且摆脱了有问题的连接

3- It is difficult to say what caused it without looking at your servers and your configuration. 3-如果不查看服务器和配置,很难说出是什么原因造成的。 It could be a whole range things from a server querying your mongod server repeatedly to a server pinging your mongod infinitely 从服务器反复查询您的mongod服务器到无限次ping您的mongod的服务器,可能涉及范围很广

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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