SQL Server timed out. Waiting period before completing the operation or the server is not responding

we had an ASP.NET web application deployed for several years ... Last week we switched to a slightly slower server to save some money.

Now we often get command timeouts: Timeout expired. Waiting period before completing the operation or the server is not responding

This is understandable because a slow server will take longer to get results; take longer and time out.

Is there any systemic way to force the SqlClient to set a longer timeout? We cannot change the code as it is everywhere ... we also use several data access technologies.

Maybe there is a default command timeout setting in the connection string? We just need to increase it by 30 seconds; we will be happy to wait a little longer for returned requests.

thanks

+2


a source to share


3 answers


I would look at this query plan and try to speed it up. 30 seconds or more is a very long time for an sql query in a web application. you speak:

we will be happy to wait a little longer for inquiries for returns.



But I would bet you would be even happier if it worked instantly. If you are absolutely sure that you have all the proper joins, indexes, etc., as well as updated statistics, etc., then a timeout might be the only way. However, as a rule of thumb, a little optimization makes the long haul a slow query much faster.

+2


a source


The connection string allows you to specify the connection timeout. I do not know of any other way to set the general settings for ADO.NET application.

There are probably a few simple fixes:



  • Run SQL Profiler for half an hour or so and build the indexes it offers.
  • Clear old records from the database
  • Add extra RAM to the server
  • Install a newer version of SQL Server
0


a source


I solved the same problem with killing a running process (Excel remote select prompt) I found in Activity Monitor in Processes

and note that in SSMS 2008 Activity Monitor is not under node control and is in toolbar and changed the interface a bit.

and how to kill this process, my script change table with 2 add column was executed successfully and has nothing to do with execution timeout and is a blocking issue

0


a source







All Articles