连接池达到最大值了,怎么办?是。NET开发的,用的MYSQL数据库!
用DataReader的地方都Close()的,也Close()了conn,也Dispose了!但是就出现黄页如下的代码:
Server Error in '/xxxxx' Application.
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.
我的连接串是这个:
<add key="data" value="server=192.168.1.123; Port=3306; uid=root; pwd=root;database=data;pooling=true;min pool size=5;max pool size=512;connect timeout = 20; "/>
大家看看,这个max pool size=512,是这么设置的吗?还能提高吗?