【数据库-MySql】 MySqlConnection error connecting: Timeout expired. (1)
来源:互联网 发布:顾客数据 编辑:程序博客网 时间:2024/06/01 22:41
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.
连接错误:超时过期,从连接池获取一个连接时超时,导致这个问题出现的原因有可能是连接池的所有连接都在使用且连接池的连接数已经达到最大。
解决方案:
1、如果是操作同一个数据库,建议只创建一次MySqlConnection且open一次,其他操作都调用这一个连接
new MySqlConnection(connString);
MySqlConnection.Open();
2、如果是操作不同的数据库,建议设置连接池的大小,建议单次调用时创建MySqlConnection的次数不要超过max pool size
MySqlConnection.ConnectionString= "server=192.1.33.26;port=8080;User Id=Admin;password=123456;pooling=true;min pool size=5;max pool size=1024;connect timeout = 20;database=Mydatabase;
1、server机器ip地址
2、port端口
3、User Id 用户名
4、password密码
5、pooling连接池
true 使用连接池
false不使用连接池
6、min pool size 连接池的容量下限
7、max pool size 连接池的容量上限 (注释容量越大耗时越多)
8、connect timeout 连接超时报警时间
9、database 数据库名称
- 【数据库-MySql】 MySqlConnection error connecting: Timeout expired. (1)
- mysql Timeout expired
- mysql连接池和 "Timeout expired"异常
- mysql Timeout expired. The timeout period elapsed prior to completio
- Error connecting to MySQL server
- zabbix监控snmp问题error:Timeout while connecting to
- error code 121:The semaphore timeout period has expired.
- Timeout expired. 解决思路
- 错误提示:OLE DB error: OLE DB or ODBC error: Query timeout expired HYT00
- mysql数据库的timeout设置
- Error: timeout expired. the timeout period elapsed prior to completion of the operation or the server is not responding (Microso
- Action(8):Error -27728:Step download timeout(120 seconds)has expired when downloading
- Error -27727: Step download timeout (120 seconds) has expired when downloading
- Error -27728: Step download timeout (120 seconds) has expired when downloading non-resource(s)
- Error -27727: Step download timeout (120 seconds) has expired when downloading resource(s).
- MySql 长时间读数据发生超时的异常 Mysql Reader Exception TimeOut expired
- About SqlCommand & SqlConnection Timeout expired
- SQL Server Driver Timeout expired
- iOS中如何呼出另一个应用
- 一款很不错的猜牌游戏源码完整版
- 如何使用AsyncSocket编写一个非常小型的群聊系统
- 2015美国大学生数学建模竞赛题目及翻译
- IP之IP Packet Format
- 【数据库-MySql】 MySqlConnection error connecting: Timeout expired. (1)
- 去掉VS2012中的红色波浪下划线
- android文档代理网址
- Android开源项目——设置图文居中的按钮 IconButton
- SVM算法入门
- 优化网站加载速度的14个技巧
- ASP.NET服务器端处理手机登陆
- MyEclipse使用教程:MyEclipse的远程调试
- #学习笔记#Concept of Hashing