我的网站运行后台生成HTML页后就会出现这个问题?
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.
这是为什么?怎样才能解决呢?
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.
这是为什么?怎样才能解决呢?
数据层 datareader 之类的 检查一下。及时关闭。
首先使用连接后立即关闭连接。如果没有关闭连接那么连接将保存到连接池中知道GC来销毁。连接池没有到达最大值但实际上连接池已经到达了最大值
其次可以通过连接字符串中的Max Pool Size = N;来动态扩大连接池中的连接最大数量。在就是关闭连接池