错误发生:超时已过期。操作完成之前经过的超时时间或服务器没有响应 [英] Error Occured: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

查看:113
本文介绍了错误发生:超时已过期。操作完成之前经过的超时时间或服务器没有响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有点网应用程序,它在我的数据库中为单个功能更新几个表例子(传递文件)。



当我点击它时会有一个按钮传递文件做很多DML和SQL查询。

前几次点击它会成功运行,但过了几次它显示以下消息。



Hi,

I have dot net application which update several table in my database for a single functionality Example (pass file).

One button "pass file" is there when I click it do many DML and sql query.
For first few click it will work successfully, but after some times it show below message.

Error Occured: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated.







我试过增加超时并使其为零。仍然无法解决问题。



请建议我如何解决这个问题。



谢谢和问候

Asutosha Sarangi




I have tried by increase timeout and make it zero also. Still not able to solve the issue.

Please suggest me how i can resolve this issue.

Thanks and Regards
Asutosha Sarangi

推荐答案

确保释放数据访问层中的连接对象。



如果你在存储过程中运行多个语句,那么用'GO'分隔它们



还可以尝试在conenction字符串中指定超时。保持超时为10或20分钟。
Make sure that you are releasing the connection objects in your data access layer.

If you are running multiple statements in the stored procedure, then seperate them with 'GO'

Also try specifying the timeout in the conenction string. Keep the timeout to 10 or 20 minutes.


在你的web.config中试试这个,



< addkey value = server = LocalHost; uid = sa; pwd =; database = DataBaseName; Connect Timeout = 200; pooling ='true'; Max Pool Size = 200/>



或者,尝试在SQL语句中选择前50个或更少的记录
Try this in your web.config,

<addkey value="server=LocalHost;uid=sa;pwd=;database=DataBaseName;Connect Timeout=200; pooling='true'; Max Pool Size=200" />

Alternatively, try to Select Top 50 or less records in your SQL Statement


这篇关于错误发生:超时已过期。操作完成之前经过的超时时间或服务器没有响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆