August 9, 2013 at 5:32 am
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
where can we check to resolve this issue ?
August 9, 2013 at 5:35 am
Check if you are connecting to the right server.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
August 9, 2013 at 5:39 am
connecting to right server , as i googled to change the timed out in connection string to 0 will resolve , where can we check the connection string
August 9, 2013 at 5:42 am
Why don't you post your code, so we know what we're dealing with.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
August 9, 2013 at 6:32 am
I think the default timeout is 20 seconds, but it could be different in your environment. If this connection is being done over a web application, they you have to ask yourself if users are going to sit there for that long waiting for a page to return. People are generally more tolerant of client-server apps, but not with web apps. Perhaps there's another way to write the procedure to get it to perform better.
August 9, 2013 at 7:33 am
Generally speaking you can adjust the timeout like you said to "fix the problem". Actually this is more like a try/catch block with an empty catch. My guess is that the sql could stand some performance improvements and then it won't even come close to the 30 seconds.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 9, 2013 at 3:42 pm
ramyours2003 (2013-08-09)
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.where can we check to resolve this issue ?
First find out whether this is happening when you are connecting or when you are running a query. I believe this is a command timeout; the error message for a connect timeout is different as I recall.
Next you need to decide whether the problem is that execution is taking too long time or that the timeout is the problem. The default timeout is 30 seconds which is a stupid number. It can be far too long, or ridiculously short, all depending on the operation.
If you are satisfied with a long execution time (for instance a long-running batch operation), change the CommandTimeout on the Command or Connection object to 0 (= wait forever). You cannot change it in the connection string.
If you are not satisfied with the long execution time, you need to find out which is the query (you can use Profiler for this) and tune it.
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply