Normally our application runs with an occasional deadlock here and there, maybe a cursor error, but recently with the release of some newer code we saw a spike in the amount of deadlocks and internal cursor errors to the point where eventually all the worker threads in the IIS application pool were deadlocked and awaiting some sort of a response from the db, disallowing anyone from accessing the application on that particular server.
The particular sql errors that we saw were :
Transaction (Process ID X) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction
and a happening a lot more freqently :
Could not complete cursor operation because the table schema changed after the cursor was declared.
Now both of these errors occur at seamingly random places through our code and we cannot pin point an offending sql statement or something that we regularly use that would cause these errors.
We are running the latest service pack of sql server 2005, with all the hotfixes, so I do not think its a bug in sql server, rather a bug in our code or something we are doing wrong
If anyone had any similar experiences with this please shed some light
Start Free Trial