MySql.Data.MySqlClient.MySqlException:超时已过期 [英] MySql.Data.MySqlClient.MySqlException: Timeout expired
问题描述
最近,我的网络应用程序中的特定页面引发了
In recent times, a particular page in my web app throws the
异常详细信息:MySql.Data.MySqlClient.MySqlException:超时 已到期.结束时间已过,直到完成 操作或服务器无响应.
Exception Details: MySql.Data.MySqlClient.MySqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
尽管我将Ibtais用作持久层,但是会发生此错误.我已经重新启动了MySql服务实例,但仍然收到相同的错误.它并没有较早发生,但最近才经常发生.
Though I use Ibtais as persistence layer, this error occurs. I have restarted the MySql service instance but stil i get the same error. It didn't happen earlier but happens frequently in recent times.
服务器上部署的所有Web应用程序都使用Ibatis,而数据库服务器仍位于安装IIS的同一台计算机上.大约有8000条记录,其中大约300到500条会在页面加载时被过滤
All the web applications deployed on the server uses Ibatis and the DB server remains on the same machine where IIS is installed. There are about 8000 records in which around 300 to 500 would be filtered on page load
对导致问题的原因有何见解?
Any insights for the cause of the problem?
推荐答案
我遇到了与您同样的问题,并且发现了这个默认命令超时 = xxx",此键的值以秒为单位.
我尝试了,对我有用.
I encountered the same problem with yours, and I found this MySQLConnection--Specifying default command timeout.
Just add "default command timeout=xxx" into your connectString, this key's value is in seconds.
I tried and it worked for me.
这篇关于MySql.Data.MySqlClient.MySqlException:超时已过期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!