Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 worker thread deadlock

Author  Topic 

jreid
Starting Member

2 Posts

Posted - 2008-10-21 : 08:00:20
We are running a two node SQL 2005 cluster in Win2k3. Every now and then we get deadlocks on worker threads. I've read about these types of deadlocks but was hoping someone could point me in a direction on where i should look for what is actually causing this? One of our SQL DBAs said it's a memory issue. But i thought that would be identified as a Memory deadlock and not a worker thread deadlock. Can anyone shed some light on this? Thanks in advance!

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2008-10-21 : 10:00:11
Memory can help to a small degree but better to optimise the code in applications / procedures. Where deadlock occurs applications should detect it and have appropriate response rather than resulting in error.

To find details of deadlock:
Turn on trace flag 1222 with “DBCC TRACEON (1222, -1)”. this will give deadlock info in SQl errorlog after deadlock including username, and query.
More on tracing deadlock:
http://blogs.msdn.com/bartd/archive/2006/09/09/747119.aspx

detecting deadlocks:
http://msdn.microsoft.com/en-us/library/ms178104.aspx

Minimize deadlocks:
http://msdn.microsoft.com/en-us/library/ms191242.aspx

Handling deadlocks:
http://msdn.microsoft.com/en-us/library/ms177453.aspx
Go to Top of Page

SimpleSQL
Yak Posting Veteran

85 Posts

Posted - 2008-10-21 : 12:16:52
Deadlocks are mainly application logic issue. tuning the queries in question (additional indexes, updating statitics) might help.

Trace flag 1222 will help you identify deadlocking stmts.

if this is scheduler deadlock that you are talkng about, than it can be due to various factors and you would have to seek assitance from MS on it.
Go to Top of Page
   

- Advertisement -