How to get rid of Deadlocks and Lock time out type issues?
Read and follow this post; it assumes InnoDB.

In particular, see the part saying to add the following to the settings.php file.

$databases['default']['default']['init_commands'] = array('isolation' =&gt; "SET SESSION tx_isolation='READ-COMMITTED'");