Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: fetchrow_hashref failed problem

by vinoth.ree (Monsignor)
on Jul 21, 2015 at 05:46 UTC ( [id://1135531]=note: print w/replies, xml ) Need Help??


in reply to fetchrow_hashref failed problem

If you are using InnoDB or any row-level transactional RDBMS, then it is possible that any write transaction can cause a deadlock, even in perfectly normal situations. Larger tables, larger writes, and long transaction blocks will often increase the likelihood of deadlocks occurring.

The only way to truly handle deadlocks is to write your code to expect them. This generally is not very difficult if your database code is well written. Often you can just put a try/catch around the query execution logic and look for a deadlock when errors occur. If you catch one, the normal thing to do is just attempt to execute the failed query again.

Read How to Cope with Deadlocks

Source from Working around MySQL error "Deadlock found when trying to get lock; try restarting transaction"


All is well. I learn by answering your questions...

Replies are listed 'Best First'.
Re^2: fetchrow_hashref failed problem
by dcunningham (Sexton) on Jul 21, 2015 at 07:07 UTC
    Thank you, but the deadlock is not the problem. It's the fetchrow_hashref error following the execute.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1135531]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-16 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found