作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
这有什么问题吗?
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.
你会遇到异常吗?如何预防?
最佳答案
您的应用程序超出了打开连接的限制。默认连接池大小为 100。
您可以在创建 MongoClient 时设置池大小
new MongoClient("mongodb://localhost/?maxPoolSize=555");
或
new MongoClient(new MongoClientSettings { MaxConnectionPoolSize = 555, Server = new MongoServerAddress("localhost") });
关于mongodb 的MongoWaitQueueFullException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29338681/
我运行一个 java 程序,它是一个线程执行程序,可将数千个文档插入到 mongodb 中的表中。我收到以下错误 Exception in thread "pool-1-thread-301" com
有时在插入一小堆不同的文档(同步)时,我会收到以下异常(请参阅下面的完整堆栈跟踪): MongoDB.Driver.MongoWaitQueueFullException: The wait queu
我是一名优秀的程序员,十分优秀!