使用mongodb时由于线程过多报错,请问怎么加大连接数和等待数
com.mongodb.MongoWaitQueueFullException: Too many threads are already waiting for a connection. Max number of threads (maxWaitQueueSize) of 500 has been exceeded.
at com.mongodb.connection.DefaultConnectionPool.createWaitQueueFullException(DefaultConnectionPool.java:270) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.connection.DefaultConnectionPool.get(DefaultConnectionPool.java:89) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.connection.DefaultConnectionPool.get(DefaultConnectionPool.java:82) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.connection.DefaultServer.getConnection(DefaultServer.java:72) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.binding.ClusterBinding$ClusterBindingConnectionSource.getConnection(ClusterBinding.java:86) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:228) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:221) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:133) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:60) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.Mongo.execute(Mongo.java:781) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.Mongo$2.execute(Mongo.java:764) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.DBCollection.executeWriteOperation(DBCollection.java:333) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.DBCollection.updateImpl(DBCollection.java:495) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.DBCollection.update(DBCollection.java:455) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.DBCollection.update(DBCollection.java:432) ~[mongo-java-driver-3.2.2.jar:?]
at com.mongodb.DBCollection.update(DBCollection.java:522) ~[mongo-java-driver-3.2.2.jar:?]
at org.nutz.mongo.ZMoCo.update(ZMoCo.java:119) ~[nutzmongo-1.r.60.jar:?]
at com.nari.nwims.busdown.busin.perf.dao.impl.PerfDaoImpl.mUoISection(PerfDaoImpl.java:35) ~[busDown.jar:?]
at com.nari.nwims.busdown.busin.perf.DB.PerfService$2.run(PerfService.java:204) [busDown.jar:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [?:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [?:1.6.0_45]
at java.lang.Thread.run(Thread.java:662) [?:1.6.0_45]