PDOException Deadlock Yesterday I had a peek in visitors and I saw following PDOException in my logs:

PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: SELECT revision.order_number AS order_number, revision.revision_id AS revision_id, revision.revision_uid AS revision_uid, revision.mail AS mail, revision.status AS status, revision.log AS log, revision.revision_timestamp AS revision_timestamp, revision.revision_hostname AS revision_hostname, revision.data AS data, base.order_id AS order_id, base.type AS type, base.uid AS uid, base.created AS created, base.changed AS changed, base.hostname AS hostname FROM {commerce_order} base INNER JOIN {commerce_order_revision} revision ON revision.revision_id = base.revision_id WHERE (base.order_id IN (:db_condition_placeholder_0)) FOR UPDATE; Array ( [:db_condition_placeholder_0] =&gt; 6131 ) in DrupalDefaultEntityController-&gt;load() (line 191 of /var/www/vhosts/shopmybooks.com/releases/20141208090103/web/includes/entity.inc).


I can't seem to find any good solution for this.
Drupal version 7.27

Any help?
I had some similiar issue.

Problem was that drupal was cosuming 100% of cpu usage, sometimes making the execution of some queries to take to long and reaching the max timeout on LOCK_TIMEOUT

If you have acccess to command line, check proccess, cpu usages, sql usage and so on

Hope it helps

There are some threads about drupal sites cosuming 100% of cpu (Kind of old but i had this problem recently), take a look

See this thread for a bit of debuging