简体   繁体   English

asp.net应用程序中的超时异常

[英]timeout exception in asp.net application

I cannot figure out why I am getting timeout exception in asp.net application upon signing into application and when I restart my webserver I don't get timeout exception? 我无法弄清楚为什么登录到应用程序后在asp.net应用程序中收到超时异常, 当我重新启动Web服务器时却没有超时异常?

Environment: 环境:

Asp.net application(IIS webserver) and DB (Sql server) both IIS and Sql server are on two different machines. ASP.NET应用程序(IIS Web服务器)和DB(SQL服务器)IIS和Sql Server都位于两台不同的计算机上。

Sql server timeout:600 seconds SQL Server超时:600秒

Webconfig setting: Webconfig设置:

<httpRuntime maxRequestLength="16384" executionTimeout="270"/>

<sessionState mode="InProc" cookieless="false" timeout="60" stateConnectionString="">

Thanks in advance. 提前致谢。

Screenshot of error : 错误的屏幕截图

在此处输入图片说明

Try to add connection timeout in connection string as "Data Source=SQLSERVER;Initial Catalog=MYCATALOG;Integrated Security=True;Connection Timeout=1000".if again "The wait operation timed out" then it is likely you have a database call that took longer than expected. 尝试在连接字符串中将连接超时添加为“数据源= SQLSERVER;初始目录= MYCATALOG;集成安全性= True;连接超时= 1000”。如果再次出现“等待操作超时”,则可能是数据库调用花了比预期更长的时间。 This could be due to any number of things: 这可能是由于许多原因造成的:

  • Transient network problem 暂态网络问题
  • High SQL server load SQL Server高负载
  • Problem with SAN, RAID, or storage device SAN,RAID或存储设备出现问题
  • Deadlock or other form of multiprocess contention 死锁或其他形式的多进程争用

You haven't shared enough information to troubleshoot. 您没有共享足够的信息来进行故障排除。 The way I would manage this would be to check for other occurrences of the problem and see if there is a pattern, eg if the problem occurs at a certain time of day. 我处理此问题的方法是检查是否出现其他问题,并查看是否存在某种模式,例如,问题是否在一天的某个特定时间发生。

Certainly increasing the timeout is not a bad idea (if it is currently set pretty low) and may resolve the problem in and of itself. 当然,增加超时并不是一个坏主意(如果当前将其设置得很低),并且可以本身解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM