Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: Timeout expired. The timeout period elapsed prior to completion

Status
Not open for further replies.

aspengal

Technical User
Dec 27, 2004
41
US
I keep getting this error when i run reports. the queries are kinda big but they run successfully in SQL Query analyzer without any trouble.
But through my C# .net, it fails at about 30 seconds after it starts.
The error I get is :
Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I tried changing the commandtimeout =180 and in my web.config which has the connection string : connect timeout = 180. still wont work.

any other settings I need to make? Please help a newbie.
 
That's a long query. I would break it up using a where-clause into several smaller queries if possible, and then join the result sets in memory.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Thank you for the response. But anyother way to alter the settings? I read something about command timeout being defaulted to 30 seconds. I changed it and still getting that error..
 
the database server query timeout is 30 seconds obviously,so you need to change it to 0 (unlimited time) in ur sql server properties tab
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top