Reputation: 171
I cannot figure out why I am getting timeout exception in asp.net application upon signing into application and when I restart my webserver I don't get timeout exception?
Environment:
Asp.net application(IIS webserver) and DB (Sql server) both IIS and Sql server are on two different machines.
Sql server timeout:600 seconds
Webconfig setting:
<httpRuntime maxRequestLength="16384" executionTimeout="270"/>
<sessionState mode="InProc" cookieless="false" timeout="60" stateConnectionString="">
Thanks in advance.
Screenshot of error:
Upvotes: 0
Views: 2877
Reputation: 548
Try to add connection timeout in connection string as "Data Source=SQLSERVER;Initial Catalog=MYCATALOG;Integrated Security=True;Connection Timeout=1000".if again "The wait operation timed out" then it is likely you have a database call that took longer than expected. This could be due to any number of things:
You haven't shared enough information to troubleshoot. The way I would manage this would be to check for other occurrences of the problem and see if there is a pattern, e.g. if the problem occurs at a certain time of day.
Certainly increasing the timeout is not a bad idea (if it is currently set pretty low) and may resolve the problem in and of itself.
Upvotes: 4