Quantcast
Viewing all articles
Browse latest Browse all 15889

SQL 2005 - .NET application doing simple update to table but I get a timeout error at random times

I have a .NET application that is getting an exception on code that does a simple update to a table.

Error I get
The timeout period elapsed prior to completion of the operation or the server is not responding

The app is using the default ado.net sql provider timeout value of 30 seconds, which for a simple command should be more than enough

Ive currently have a profiler trace running to capture what I suspectis a blocking issue, but this is the 2nd time Ive done this.  The last trace I had running did not result in capturing anything.

I'm following this example
http://www.mssqltips.com/sqlservertutorial/252/tracing-a-sql-server-deadlock/

The events Im capturing are
Deadlock graph
Lock: Deadlock
Lock: Deadlock Chain

So, if no blocking is captured, what the heck could cause a simple update to take over the default command timeout of 30 seconds?

The table itself has about 300K records in it and the update is using a where clause which includes a field that is not indexed.  So that's one idea - add an index for the column that the update is using.

Still its the random nature of the error that is frustrating.


Viewing all articles
Browse latest Browse all 15889

Trending Articles