开发者社区> 问答> 正文

mongodb分片集群出现MongoWaitQueueFullException异常信息

通过java客户端链接mongodb时出现如下异常:

com.mongodb.MongoWaitQueueFullException: Too many threads are already waiting for a connection. Max number of threads (maxWaitQueueSize) of 5 has been exceeded.
    at com.mongodb.connection.DefaultConnectionPool.createWaitQueueFullException(DefaultConnectionPool.java:274)
    at com.mongodb.connection.DefaultConnectionPool.get(DefaultConnectionPool.java:93)
    at com.mongodb.connection.DefaultConnectionPool.get(DefaultConnectionPool.java:86)
    at com.mongodb.connection.DefaultServer.getConnection(DefaultServer.java:77)
    at com.mongodb.binding.ClusterBinding$ClusterBindingConnectionSource.getConnection(ClusterBinding.java:86)
    at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:422)
    at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:415)
    at com.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:133)
    at com.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:60)
    at com.mongodb.Mongo.execute(Mongo.java:819)
    at com.mongodb.Mongo$2.execute(Mongo.java:802)
    at com.mongodb.DBCollection.executeWriteOperation(DBCollection.java:340)
    at com.mongodb.DBCollection.insert(DBCollection.java:335)
    at com.mongodb.DBCollection.insert(DBCollection.java:326)
    at com.mongodb.DBCollection.insert(DBCollection.java:296)
    at com.mongodb.DBCollection.insert(DBCollection.java:262)
    at com.mongodb.DBCollection.insert(DBCollection.java:199)
    at org.springframework.data.mongodb.core.MongoTemplate$9.doInCollection(MongoTemplate.java:1054)
    at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:482)
    ... 22 more

通过java链接mongodb时出现的异常,求解??

展开
收起
magicalman 2021-10-26 18:41:26 1747 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
Data as a Service - 数据即服务 -- MongoDB⾼级应⽤模式 立即下载
开源数据库 MongoDB 专场 MongoDB疑难杂症分析及优化 立即下载
饿了么高级架构师陈东明:MongoDB是如何逐步提高可靠性的 立即下载