db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raj <nwi...@yahoo.com>
Subject RE: Deadlock error
Date Sun, 20 Apr 2008 02:43:16 GMT
Naveen,
 Thanks for your response.
Will take a look at the business logic.

Also, the error is always coming from few selected
areas of code, which suggests reviewing how we a
handling/grouping transactions.

Cheers,
Raj

--- Naveen Murthy <naveen.srinivasa@aricent.com>
wrote:

> repeatable_read is one level higher than
> read-committed.
> 
> as name suggests, its meant to keep ur reads
> repeatable,
> so typically, during a tran, at time T if u read a
> row,
> then if u read again during the same tran at time
> T2, that row shud remain
> constant. DB ensures this by locking that row (or
> page) after the first 
> read.
> 
> in read-committed; after read in a tran, those
> rows/pages are released immediatly
> so that other trans can modify them. but u lose the
> repeatability as seen in other case.
> 
> look at ur usecase, for eg if most transactions
> involve only 
> one actor accessing a set of resources ( for eg; if
> only one technician
> is always allowed to work on a job) then chances of
> ur needing
> repeatable read is very less, in that case better go
> with read
> commited. lesser excl locks, even ur db will perf
> Lill faster.
> 
> 
> Naveen
> 
> 
> -----Original Message-----
> From: Raj [mailto:nwiraj@yahoo.com]
> Sent: Fri 4/18/2008 1:46 PM
> To: Apache Torque Users List
> Subject: Re: Deadlock error
>  
> More info.. the transaction isolation level in
> my.cnf
> is set to REPEATABLE-READ.
> My google research suggested setting this to
> READ-COMMITED, need to review th implications before
> changing this.
> Also, not sure if this is the source of the problem.
> Thanks,
> Raj
> 
> my.cnf:
> 
> # Set the default transaction isolation level.
> Levels
> available are:
> # READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ,
> SERIALIZABLE
> transaction_isolation = REPEATABLE-READ
> 
> --- Raj <nwiraj@yahoo.com> wrote:
> 
> > 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 
> > know-it-all with Yahoo! Mobile.  Try it now. 
> >
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail:
> > torque-user-help@db.apache.org
> > 
> > 
> 
> 
> 
>      
>
____________________________________________________________________________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now. 
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
> torque-user-help@db.apache.org
> 
> 
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
torque-user-help@db.apache.org



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message