The wait operation timed out. ASP
I fixed this error by finding the exact procedure in event viewer where timeout was happening.
Connected to the same Database in SSMS and ran:
exec sp_recompile 'Procedure name'
It showed the below message:
Object 'Procedure name' was successfully marked for recompilation.
If you found the exact error "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:
- Transient network problem
- High SQL server load
- Problem with SAN, RAID, or storage device
- Deadlock or other form of multiprocess contention
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.
Remember to increase the connection timeout AND the command timeout:
SqlConnection(@"Data Source=SQLSERVER;Initial Catalog=MYCATALOG;Integrated Security=True;Connection Timeout=1000");//huge timeout
and then:
com.CommandTimeout = 950;//or whatever