Expected wait operation. ASP

I created an internal website for our company. It has been running smoothly for several months, and then I did a big update due to custom suggestions. When I run live, it works fine. Then all of a sudden, one of my Japanese users sent me a Pending operation. mistake. When I check access to a specific link, it works fine for me and some others, which I ask you to check if they have access to this page. I am already updating httpRuntime executeTimeout, but still no luck. Is this an error connecting to the database? If I increase the timeout in the database connection, will this fix the problem?

+12
sql connection
source share
5 answers

If you find the exact “Pending Pending” error, then most likely you have a database call that took longer than expected. This can be due to any number of things:

  • The problem of transition networks
  • High SQL Server utilization
  • Problem with SAN, RAID or storage device
  • Deadlock or other form of multiprocessing competition

You do not have enough information to troubleshoot. The way I would handle this is to check for other problems and see if there is a template, for example. if the problem occurs at a specific time of the day.

Of course, increasing the timeout is a good idea (if it is currently set fairly low) and can solve the problem on its own.

+13
source share

Remember to increase the connection timeout and command timeout:

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

and then:

 com.CommandTimeout = 950;//or whatever 
+13
source share

I fixed this error by finding the exact procedure in the event viewer where the timeout occurred.

Connected to the same database in SSMS and ran:

 exec sp_recompile 'Procedure name' 

This showed the message below:

The Procedure Name object was successfully marked for recompilation.

+4
source share

This can also be another problem. For example, if you execute many requests during one open connection, and it exceeds connection lifetime. Then you need to set the Connection Lifetime property in the connection string. Here is the description:

When the connection is returned to the pool, its creation time is compared with the current time, and the connection is disconnected if this period of time (in seconds) exceeds the value specified in the life of the connection. This is useful in cluster configurations to force load balancing between a running server and a server that has just been connected to the network. A value of zero (0) causes the connection to be set to the maximum connection timeout.

0
source share

In the web.config file, go to the connection string and add the following :; Integrated Security = True; Connect Timeout = 120 "

0
source share

All Articles