您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

mysql ExecuteReader问题_MySQL

2025/7/16 22:08:03发布24次查看
今天遇到一棘手问题,在调用executereader时,出现如下异常信息:
the timeout period elapsed prior to obtaining a connection from the pool ...通过调用show processlist查看链接数,原来挂了几百个链接,没有及时释放。
代码在调用reader之后,系统没有关闭connection,结果导致connection不够用。
ps:
命令: show processlist;
如果是root帐号,你能看到所有用户的当前连接。如果是其它普通帐号,只能看到自己占用的连接。
show processlist;只列出前100条,如果想全列出请使用show full processlist;
set global wait_timeout=100
设置连接等待时间为100毫秒。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product