You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Vince Clark <vc...@globalera.com> on 2009/08/26 06:56:30 UTC

SQL Server deadlocks

This is REALLY frustrating. Problem does not occur with Postgres. Haven't tested other databases. 

I'm using the default isolation level, read committed and have tried jTDS and M$ jdbc 4 drivers. I'm batch loading orders from a legacy system using a custom simple method and get deadlocks to the point that I have to shutdown the appserver. When I run the job the Order tables and JobSandbox locks up completely. Also tried changing isolation level to None. Not sure what data implications that has, but didn't seem to help anyway. 

I would think this is a problem with my code but it runs without a problem on Postgres. I did some searching and found suggestions that it has to do with indexing on tables. Most suggestions requireusing a tool to analyze the query causing the deadlock and adding indexes accordingly. Seems excessive. 



Vince Clark 
www.globalera.com 
vclark@globalera.com 
(303) 493-6723 office 
(303) 523-4843 cell 


Re: SQL Server deadlocks

Posted by Vince Clark <vc...@globalera.com>.
Update. I commented out all the send notification services that get called during the shipping process. They are all async and apparently are contributing to the deadlock issue. It seems to have solved my problem for now but performance is still bad during my order import process. 

Next step is to investigate the setup of SQL Server with the DBA. Hopefully I will discover some default lock setting on the sql server side that is the real culprit.

Vince Clark 
www.globalera.com 
vclark@globalera.com 
(303) 493-6723 office 
(303) 523-4843 cell 


----- Original Message -----
From: "Vince Clark" <vc...@globalera.com>
To: "user" <us...@ofbiz.apache.org>
Sent: Tuesday, August 25, 2009 10:56:30 PM GMT -07:00 US/Canada Mountain
Subject: SQL Server deadlocks

This is REALLY frustrating. Problem does not occur with Postgres. Haven't tested other databases. 

I'm using the default isolation level, read committed and have tried jTDS and M$ jdbc 4 drivers. I'm batch loading orders from a legacy system using a custom simple method and get deadlocks to the point that I have to shutdown the appserver. When I run the job the Order tables and JobSandbox locks up completely. Also tried changing isolation level to None. Not sure what data implications that has, but didn't seem to help anyway. 

I would think this is a problem with my code but it runs without a problem on Postgres. I did some searching and found suggestions that it has to do with indexing on tables. Most suggestions requireusing a tool to analyze the query causing the deadlock and adding indexes accordingly. Seems excessive. 



Vince Clark 
www.globalera.com 
vclark@globalera.com 
(303) 493-6723 office 
(303) 523-4843 cell