From torque-user-return-7900-apmail-db-torque-user-archive=db.apache.org@db.apache.org Fri Apr 18 23:52:07 2008 Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 3577 invoked from network); 18 Apr 2008 23:52:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Apr 2008 23:52:07 -0000 Received: (qmail 24737 invoked by uid 500); 18 Apr 2008 23:52:07 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 24710 invoked by uid 500); 18 Apr 2008 23:52:07 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 77516 invoked by uid 99); 18 Apr 2008 17:34:04 -0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) X-Originating-IP: 64.115.227.187 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C8A17A.565EB2E4" Subject: RE: Deadlock error Date: Fri, 18 Apr 2008 13:33:38 -0400 Message-ID: <35DBF5C7E3C79B44A7753CFFF51753AD0184D841@DLEX01.datalinx.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: <35DBF5C7E3C79B44A7753CFFF51753AD0184D841@DLEX01.datalinx.net> Thread-topic: Deadlock error Thread-index: AciheDC5X9npQ6a0QIK0OnRsRN2DtAAAKdk0 References: <749796.40249.qm@web32404.mail.mud.yahoo.com> From: "Naveen Murthy" To: "Apache Torque Users List" X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C8A17A.565EB2E4 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Raj; the deadlock error is initially wrapped in sqlexception. this is probably a contention for db resource as a part of the underlying db transaction. it may not have anything to do with torque. u may have to investigate ur usecases to see if such scenarios arise. typical scenario will be, tran 1 is waiting for exclusive lock on table B, while at same time not releasing lock on table A tran 2 is doing viceversa and u have a deadlock. Depending on the rules set at the db, one will succeed and other wud fail with error to the user. few yrs ago, we were working for a client who ran a version of sybase that did not support row level locking. it only supported Page level locking. So even tho there was no contention for a single row, if unfortunately some other row was in the same page, that got involved in another transaction, we intermittently got deadlocks. after lotta debuging we fnally solved the issue by setting max_rows_per_page to 1 for the concerned tables. thx, Naveen -----Original Message----- From: Raj [mailto:nwiraj@yahoo.com] Sent: Fri 4/18/2008 1:17 PM To: Apache Torque Users List Subject: Deadlock error =20 All, Getting a deadlock related error intermittently. The stack trace is as shown below. Torque version: 3.2 Mysql version: mysql Ver 14.12 Distrib 5.0.33, for apple-darwin8.8.4 (i686) using EditLine wrapper Any hints? Thanks, Raj org.apache.torque.TorqueException: java.sql.SQLException: Deadlock found when trying to get lock; Try restarting transaction message from server: "Lock wait timeout exceeded; try restarting transaction" at org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:103) at org.apache.torque.util.BasePeer.insertOrUpdateRecord(BasePeer.java:639) at org.apache.torque.util.BasePeer.access$000(BasePeer.java:73) at org.apache.torque.util.BasePeer$IOUProcessCallback.process(BasePeer.java:= 1254) at org.apache.torque.util.BasePeer.processTables(BasePeer.java:1645) at org.apache.torque.util.BasePeer.doUpdate(BasePeer.java:1234) = _________________________________________________________________________= ___________ Be a better friend, newshound, and=20 know-it-all with Yahoo! Mobile. Try it now. = http://mobile.yahoo.com/;_ylt=3DAhu06i62sR8HDtDypao8Wcj9tAcJ --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org ------_=_NextPart_001_01C8A17A.565EB2E4 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org ------_=_NextPart_001_01C8A17A.565EB2E4--