Timeout expired

来源:百度知道 编辑:UC知道 时间:2024/06/25 22:32:58
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.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: 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.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Timeout expired. The timeout period elaps

连接超时
你可以尝试这样解决:
SqlCommand cmd = new SqlCommand(sql);
...
cmd.CommandTimeout = 0;
...

无法打开数据库连接,可能数据库服务没有启动

Timeout 超时的意思