【发布时间】:2011-07-27 17:39:37
【问题描述】:
我在我的应用程序中使用 node.js 和 MongoDB。每当我使用 localhost 时,我都没有问题,并且应用程序运行良好。但是,在服务器上,数据库将我限制为 50 个连接。以下是日志示例:
Wed Jul 27 13:33:29 [initandlisten] waiting for connections on port 27017
Wed Jul 27 13:33:29 [websvr] web admin interface listening on port 28017
Wed Jul 27 13:34:50 [initandlisten] connection accepted from 127.0.0.1:42035 #1
Wed Jul 27 13:35:16 [initandlisten] connection accepted from 127.0.0.1:42181 #2
Wed Jul 27 13:35:16 [initandlisten] connection accepted from 127.0.0.1:42182 #3
Wed Jul 27 13:35:25 [initandlisten] connection accepted from 127.0.0.1:42249 #4
...
Wed Jul 27 13:36:09 [initandlisten] connection accepted from 127.0.0.1:42518 #50
Wed Jul 27 13:36:10 [initandlisten] connection accepted from 127.0.0.1:42524 #51
Wed Jul 27 13:36:10 [initandlisten] can't create new thread, closing connection
我正在使用命令mongod --maxConns=5000 启动该进程。有谁知道是什么导致了这个连接限制?
【问题讨论】:
-
您找到解决方案了吗?