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"
In reply to Re: fetchrow_hashref failed problem
by vinoth.ree
in thread fetchrow_hashref failed problem
by dcunningham
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |