juriansluiman/SlmQueueDoctrine — pull request #75 by basz (2014-09-26 10:18:05+00:00)
Title: Purge executeUpdate within transaction to prevent MySQL Deadlock

Under the following conditions MySQL Deadlock errors are common in the DoctrineQueue::purge method.

- options delete_lifetime > -1 or buried_lifetime > -1
- enough delete of buried entries in the DB so rows are actually selected for deletion
- using multiple workers
- jobs are short enough in duration (under 0.5 seconds) to encounter the locks

Apparently we should recover manually with transactions in a try catch block

http://dev.mysql.com/doc/refman/5.5/en/glossary.html#glos_deadlock