gpt4 book ai didi

mongodb 的MongoWaitQueueFullException

转载 作者:可可西里 更新时间:2023-11-01 09:08:53 26 4
gpt4 key购买 nike

这有什么问题吗?

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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com