连接mongo失败
-
默认情况下,mongo最大支持65535个连接
-
查询当前支持的连接数
db.serverStatus.connections
{ "current" : 3,// 当前连接数 "available" : 999997, // 可用连接数 "totalCreated" : 48, // 已经创建 "active" : 2, // 当前活跃 "exhaustIsMaster" : 1, "exhaustHello" : 0, "awaitingTopologyChanges" : 1 }
原因
-
mongo配置文件限制
net: maxIncomingConnections: <uint>
-
docker容器
open file
数量限制ulimit -a