List:MySQL and Perl« Previous MessageNext Message »
From:David Dick Date:April 18 2004 8:22pm
Subject:Re: DBD::mysql::st execute failed: Deadlock found when trying to
get lock;
View as plain text  
G'day mayuran,
Some questions to narrow the field of possiblities. Is this in a 
web-server/apache type environment or are you forking multiple processes 
yourself?  If you are using a webserver, are you using mod_perl or 
mod_cgi? What version of mysql are you using? What sort of locking 
statements are you using in your code?  What makes you think that the 
database is wrong in telling you that (at least) 2 children are trying 
to lock the same records?
uru
-Dave

mayuran wrote:
> After testing one of my scripts on production servers (quad xeon's, 4 
> 3ghz cpu x 2),
> we noticed that the script was taking too long when doing DB 
> transactions.  So my
> boss asked me to rewrite the db part, to have many children updating the 
> DB instead
> of 1 parent.  He thought this would make things faster and make more use 
> of the
> massive hardware.  After i rewrote the code I ran into this problem:
> 
> DBD::mysql::st execute failed: Deadlock found when trying to get lock; 
> Try restarting transaction.
> 
> There are 8 tables in total, but i made it so they only update 1 to try 
> and narrow the problem
> down.  There are 2 children currently updating the same table, and they 
> are NOT updating the same
> rows using the same keys.  In other words, no two children ever 
> update/insert the same data.  Can
> anyone shed some light on this matter, I have never ran into deadlocks 
> before.  Maybe the logic I
> am using is wrong or something.  Any input would be appreciated.
> 
> Thanks.
> 
> 
> 
Thread
DBD::mysql::st execute failed: Deadlock found when trying to getlock;Unknown Sender18 Apr
  • Re: DBD::mysql::st execute failed: Deadlock found when trying toget lock;David Dick18 Apr
    • Re: DBD::mysql::st execute failed: Deadlock found when trying toget lock;Unknown Sender19 Apr