Last post Jan 03, 2012 03:38 AM by Ben Teo
Dec 23, 2011 10:15 AM|Ben Teo|LINK
Our app encountered the following Timeout expired error: Connection err:Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
* Is the 'Timeout expired' caused by heavy data activity in the sqlserver?
* Could changing the 'Connect Timeout' in the connection string reslove it?
Data Source=.;Initial Catalog=MSGW;Integrated Security=SSPI;Connect Timeout=60
* When 'Timeout expired' occured, is the data still accessible (read, update, delete)?
* How can the 'timeout expired' be simulated?
Dec 23, 2011 10:20 AM|Shatrughna.kumar|LINK
Dec 23, 2011 10:34 AM|Ben Teo|LINK
Does ConnectionTimeout in the connection object has the same effect?
SqlConnection cn = new SqlConnection();
cn.ConnectionTimeout = 120
Dec 23, 2011 10:38 AM|Shatrughna.kumar|LINK
Setting(In Config) will be global and this one for specific case only.
Dec 25, 2011 06:09 AM|muhsin145|LINK
In ADo.Net , usualy developers are gettings two timeout errors,
connection timeout (default 15 seconds)
if the connection cannot be established within the timeframe specified
command timeout (default 30 seconds)
cancellation of the executing command for the connection if it does not respond within the specified time.
I think your time out error is not caused beacuse of heaviness of the query execution.
Dec 27, 2011 09:43 AM|Chen Yu - MSFT|LINK
I found this blog which is talking about the error you post. It may help you to solve your problem.
Jan 03, 2012 03:38 AM|Ben Teo|LINK
Thanks for all your replies.
Tried increasing the 'Time out' in the connection string from the original 10 to 30 and it seems ok.
Also specify Timeout in the SqlCommand object.