通过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时出现的异常,求解??
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。