first I would watch the SQL on the DB server to see what it is getting and what it is doing with it. since ofbiz creates and send a Stored procedure see if it creating more than one for the same operation.
Vince Clark sent the following on 8/3/2009 7:54 AM: > I am batch loading a few hundred orders at a time from a legacy system. I am > using a custom simple method to read in the order data, create the order > using the storeOrder service, and then quickShipEntireOrder. > > Creating the order is working great, but when I added quickShip into the code > I started getting database deadlocks. The job eventually finishes but is > quite a performance issue. > > Environment: > Sun JDK 1.6 > CentOS with 2.6.18 kernel > SQL Server 2005 (on another server obviously) > JTDS JDBC driver > > I'm checking with the DBA to find out how SQL Server is configured. I know it > has plenty of hardware but not sure how they have it configured for number of > connections and that sort of thing. OFBiz is configured for 250 max db > connections. Should be sufficient since my process is the only thing hitting > it right now. > > Any advice on where to look from here would be helpful. > > Here is the error: > > Failure in findOne operation for entity [Shipment]: > org.ofbiz.entity.GenericDataSourceException: SQL Exception while executing > the following:SELECT SHIPMENT_TYPE_ID, STATUS_ID, PRIMARY_ORDER_ID, > PRIMARY_RETURN_ID, PRIMARY_SHIP_GROUP_SEQ_ID, PICKLIST_BIN_ID, > ESTIMATED_READY_DATE, ESTIMATED_SHIP_DATE, ESTIMATED_SHIP_WORK_EFF_ID, > ESTIMATED_ARRIVAL_DATE, ESTIMATED_ARRIVAL_WORK_EFF_ID, LATEST_CANCEL_DATE, > ESTIMATED_SHIP_COST, CURRENCY_UOM_ID, HANDLING_INSTRUCTIONS, > ORIGIN_FACILITY_ID, DESTINATION_FACILITY_ID, ORIGIN_CONTACT_MECH_ID, > ORIGIN_TELECOM_NUMBER_ID, DESTINATION_CONTACT_MECH_ID, > DESTINATION_TELECOM_NUMBER_ID, PARTY_ID_TO, PARTY_ID_FROM, > ADDITIONAL_SHIPPING_CHARGE, ADDTL_SHIPPING_CHARGE_DESC, CREATED_DATE, > CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE, LAST_MODIFIED_BY_USER_LOGIN, > LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP > FROM dbo.SHIPMENT WHERE SHIPMENT_ID=? (Transaction (Process ID 72) was > deadlocked on lock resources with another process a nd has been chosen as the deadlock victim. Rerun the transaction.). Rolling back transaction. > Exception: org.ofbiz.entity.GenericDataSourceException > > > > > Vince Clark > www.globalera.com > vcl...@globalera.com > (303) 493-6723 office > (303) 523-4843 cell > > -- BJ Freeman http://www.businessesnetwork.com/automation http://bjfreeman.elance.com http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro Systems Integrator.