简体   繁体   English

等待操作超时。 ASP

[英]The wait operation timed out. ASP

I created an internal website for our company.我为我们公司创建了一个内部网站。 It run smoothly for several months and then I made a major update due to user suggestion.它顺利运行了几个月,然后由于用户的建议,我进行了重大更新。 When I run in live, it run normally.当我在现场运行时,它运行正常。 Then suddenly one of my user from japan sending me an "The Wait operation timed out."然后突然我的一位日本用户向我发送了“等待操作超时”。 error.错误。 When I check access that certain link, It run normally for me and some other who I ask to check if they access that page.当我检查访问该特定链接时,它会为我和其他一些我要求检查他们是否访问该页面的人正常运行。 I already update the httpRuntime executionTimeout but still no luck.我已经更新了 httpRuntime executionTimeout 但仍然没有运气。 Is it the error come from database connection?错误来自数据库连接吗? If I increase the timeout in the database connection it will be fix the problem?如果我增加数据库连接的超时时间,它会解决问题吗?

If you found the exact error "The wait operation timed out" then it is likely you have a database call that took longer than expected. 如果您发现确切的错误“等待操作超时”,那么您可能需要花费比预期更长的数据库调用。 This could be due to any number of things: 这可能是由于许多事情:

  1. Transient network problem 瞬态网络问题
  2. High SQL server load 高SQL服务器负载
  3. Problem with SAN, RAID, or storage device SAN,RAID或存储设备出现问题
  4. 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. 当然,增加超时并不是一个坏主意(如果它当前设置得相当低)并且可以解决问题本身。

Remember to increase the connection timeout AND the command timeout: 请记住增加连接超时和命令超时:

SqlConnection(@"Data Source=SQLSERVER;Initial Catalog=MYCATALOG;Integrated Security=True;Connection Timeout=1000");//huge timeout

and then: 然后:

com.CommandTimeout = 950;//or whatever

I fixed this error by finding the exact procedure in event viewer where timeout was happening. 我通过在事件查看器中找到发生超时的确切过程来修复此错误。

Connected to the same Database in SSMS and ran: 连接到SSMS中的同一个数据库并运行:

exec sp_recompile 'Procedure name'

It showed the below message: 它显示以下消息:

Object 'Procedure name' was successfully marked for recompilation. 对象'过程名称'已成功标记为重新编译。

It can also be another issue. 它也可能是另一个问题。 For instance, if you run a lot of queries during one connection opened and it exceeds the connection lifetime. 例如,如果您在一个连接打开期间运行了大量查询,并且它超过了连接生命周期。 Then you need to set Connection Lifetime property in your connection string. 然后,您需要在连接字符串中设置Connection Lifetime属性。 Here is the description: 这是描述:

When a connection is returned to the pool, its creation time is compared with the current time, and the connection is destroyed if that time span (in seconds) exceeds the value specified by Connection Lifetime. 将连接返回到池时,会将其创建时间与当前时间进行比较,如果该时间跨度(以秒为单位)超过Connection Lifetime指定的值,则会破坏连接。 This is useful in clustered configurations to force load balancing between a running server and a server just brought online. 这在群集配置中非常有用,可以在正在运行的服务器和刚刚联机的服务器之间强制实现负载平衡。 A value of zero (0) causes pooled connections to have the maximum connection timeout. 值为零(0)会导致池连接具有最大连接超时。

在web.config文件中转到连接字符串并添加:; Integrated Security = True; Connect Timeout = 120“

In my case, it was fixed by turning on Named Pipes from SQL Server Configuration Manager在我的情况下,它是通过从 SQL 服务器配置管理器打开命名管道来修复的在此处输入图像描述

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

相关问题 等待操作超时。 .aspx - The wait operation timed out. .aspx ASP .NET应用中的sql命令“等待操作超时” - “wait operation timed out” for sql command in ASP .NET app 查找等待操作超时的原因 - Find Reason for The wait operation timed out 等待操作超时 - memory 问题 - The Wait Operation Timed Out - memory issues LINQ to Entities(等待操作超时) - LINQ to Entities (The wait operation timed out) The wait operation timed out Win32Exception (0x80004005): The wait operation timed out azure - The wait operation timed out Win32Exception (0x80004005): The wait operation timed out azure 实体框架-排序字符串导致“等待操作超时” - Entity Framework - Sorting Strings is causing “The wait operation timed out” 无法连接到SQL Server会话数据库-等待操作超时 - Unable to connect to SQL Server session database - The wait operation timed out SQL Server Express (localdb) 等待操作超时——查询随机超时? - SQL Server Express (localdb) The wait operation timed out - query timing out at random? 目前,我的所有SQL请求显示“System.ComponentModel.Win32Exception:等待操作超时” - Currently, All my SQL Request showing “System.ComponentModel.Win32Exception: The wait operation timed out”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM