最新消息:

asp.net连接mysql得到错误all pooled connections were in use and max pool size was reach

c# admin 590浏览 0评论

asp.net连接mysql数据库时,得到以下错误信息

MySql.Data.MySqlClient.MySqlException (0x80004005): error connecting: 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.

得到这个错误,有2个原因:
1. 打开太多的mysql连接,没有及时关闭
2. 可能是因为启用了Pool的功能,请编辑连接字符串,添加 Pooling=False;

如Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Pooling=False;

转载请注明:中国翼通 » asp.net连接mysql得到错误all pooled connections were in use and max pool size was reach


分享到:
已有 0 条评论