gpt4 book ai didi

c# - 默认的 MaxPoolSize 是多少?

转载 作者:太空狗 更新时间:2023-10-29 21:22:04 28 4
gpt4 key购买 nike

我遇到了可怕的错误:

Timeout expired. The timeout period elapsed prior to obtaining a connection from 
the pool. This may have occurred because all pooled connections were in use
and max pool size was reached.

在 sql 中,我看到通过运行我只打开了 116 个连接:

SELECT 
DB_NAME(dbid) as DBName,
COUNT(dbid) as NumberOfConnections,
loginame as LoginName
FROM
sys.sysprocesses
WHERE
dbid > 0
GROUP BY
dbid, loginame
;

116 似乎很低,我目前没有设置 MaxPoolSize。默认的 MaxPoolSize 是多少?

我还确保在完成后关闭所有连接。

最佳答案

From MSDN : 指定的最大池大小(默认值为 100)。

您遇到的是超时错误。它只表明它可能是由达到最大池大小引起的,但也可能是由于许多其他原因造成的。

关于c# - 默认的 MaxPoolSize 是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30331955/

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