java - How to resolve mongodb client Timeout waiting for a pooled item after 120000 MILLISECONDS exceptino error -
i have java class (not java spring or server) 1) inserts documents 1 table, 2) reads documents other table, 3) insert documents table , 4) delete documents table.
all above 4 operations happens 3 tables.
i following error.
exception in thread "pool-1-thread-240" com.mongodb.mongotimeoutexception: timeout waiting pooled item after 120000 milliseconds @ com.mongodb.concurrentpool.get(concurrentpool.java:113) @ com.mongodb.pooledconnectionprovider.get(pooledconnectionprovider.java:75) @ com.mongodb.defaultserver.getconnection(defaultserver.java:73) @ com.mongodb.basecluster$wrappedserver.getconnection(basecluster.java:221) @ com.mongodb.dbtcpconnector$myport.getconnection(dbtcpconnector.java:508) @ com.mongodb.dbtcpconnector$myport.get(dbtcpconnector.java:456) @ com.mongodb.dbtcpconnector.getprimaryport(dbtcpconnector.java:414) @ com.mongodb.dbcollectionimpl.insert(dbcollectionimpl.java:176) @ com.mongodb.dbcollectionimpl.insert(dbcollectionimpl.java:159) @ com.mongodb.dbcollection.insert(dbcollection.java:93) @ com.mongodb.dbcollection.insert(dbcollection.java:78) @ com.mongodb.dbcollection.insert(dbcollection.java:120) @ myprogram$myclass.run(myprogram.java:149) @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:895) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:918) @ java.lang.thread.run(thread.java:695) a) how can fix it? using mongod 2.6.3 in mac os system. b) should increase mongodb pool in client side. c) if yes, how should it? d) maximum number can set it?
i problem line in java code insert operation.
the default pool connection number 100 , maximum pool size 20 single mongodb instance.
for resolve problem take article in consideration
Comments
Post a Comment