Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mongodb the MongoWaitQueueFullException

Tags:

mongodb

What's wrong about this?

mongodb3.01 x64 + win8.1 64 + CSharpDriver-2.0.0-rc0

MongoDB.Driver.MongoWaitQueueFullException Message: 
“MongoDB.Driver.MongoWaitQueueFullException”类型的未经处理的异常在 mscorlib.dll 中发生

其他信息: The wait queue for acquiring a connection to server localhost:27017 is full.

Would you meet the exception and how to prevent it?

like image 315
foxundermon Avatar asked Mar 30 '15 05:03

foxundermon


1 Answers

You application exceeded limit of opened connections. Default connection pool size is 100.

You can set pool size on creating MongoClient

new MongoClient("mongodb://localhost/?maxPoolSize=555");

or

new MongoClient(new MongoClientSettings { MaxConnectionPoolSize = 555, Server = new MongoServerAddress("localhost") });
like image 88
rnofenko Avatar answered Sep 17 '22 04:09

rnofenko