mongodb操作时出现异常信息如下:
Caused by: com.mongodb.MongoTimeoutException: Timeout waiting for a pooled item after 5000 MILLISECONDS
at com.mongodb.internal.connection.ConcurrentPool.get(ConcurrentPool.java:127)
at com.mongodb.connection.DefaultConnectionPool.getPooledConnection(DefaultConnectionPool.java:256)
at com.mongodb.connection.DefaultConnectionPool.get(DefaultConnectionPool.java:97)
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:431)
at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:406)
at com.mongodb.operation.FindOperation.execute(FindOperation.java:709)
at com.mongodb.operation.FindOperation.execute(FindOperation.java:81)
at com.mongodb.Mongo.execute(Mongo.java:810)
at com.mongodb.Mongo$2.execute(Mongo.java:797)
at com.mongodb.DBCursor.initializeCursor(DBCursor.java:871)
at com.mongodb.DBCursor.hasNext(DBCursor.java:142)
at com.mongodb.DBCursor.one(DBCursor.java:680)
at com.mongodb.DBCollection.findOne(DBCollection.java:831)
at com.mongodb.DBCollection.findOne(DBCollection.java:794)
at com.mongodb.DBCollection.findOne(DBCollection.java:741)
at org.springframework.data.mongodb.core.MongoTemplate$FindOneCallback.doInCollection(MongoTemplate.java:2197)
at org.springframework.data.mongodb.core.MongoTemplate$FindOneCallback.doInCollection(MongoTemplate.java:2181)
at org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1925)
... 18 more
这是哪里配置的不对吗???
telnet 10.0.42.211 27017 参考我的文章
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。