How can I solve MongoWaitQueueFullException?
I run a java program which is a thread executor program that inserts thousands of documents to a table in mongodb. I get the following error Exception in thread "pool-1-thread-301" 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.PooledConnectionProvider.get(PooledConnectionProvider.java:70) at com.mongodb.DefaultServer.getConnection(DefaultServer.java:73) at com.mongodb.BaseCluster$WrappedServer.getConnection(BaseCluster.java:221) at com.mongodb.DBTCPConnector