1

Here is my error message

PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when 
trying to get lock; try restarting transaction: 
UPDATE {commerce_order} SET 
order_number=:db_update_placeholder_0, revision_id=:db_update_placeholder_1, 
type=:db_update_placeholder_2, uid=:db_update_placeholder_3, 
mail=:db_update_placeholder_4, status=:db_update_placeholder_5, 
created=:db_update_placeholder_6, changed=:db_update_placeholder_7, 
placed=:db_update_placeholder_8, hostname=:db_update_placeholder_9, 
data=:db_update_placeholder_10 WHERE (order_id = :db_condition_placeholder_0) ; 
Array ( [:db_update_placeholder_0] => 201805822 [:db_update_placeholder_1] => 16807 
[:db_update_placeholder_2] => commerce_order [:db_update_placeholder_3] => 0 
[:db_update_placeholder_4] => [:db_update_placeholder_5] => checkout_checkout 
[:db_update_placeholder_6] => 1540480400 [:db_update_placeholder_7] => 
1540481979 [:db_update_placeholder_8] => 0 [:db_update_placeholder_9] => 
128.199.161.50 [:db_update_placeholder_10] => a:4: 
{s:17:"last_cart_refresh";i:1540481976;s:16:"shipping_service";s:17:"shipping_custom|1";s:14:"with_backorder";s:0:"";s:17:"backorder_service";s:5:"_none";}
[:db_condition_placeholder_0] => 5056 ) in drupal_write_record() (line 7387 of ~/public_html/includes/common.inc).

anyone can help me? whats wrong with that things?

Sangam Belose
  • 4,262
  • 8
  • 26
  • 48
  • Please confirm that you're using the latest version of Drupal 7. I'm seeing a lot of these issues on unpatched Drupal installations, right in the core, and they've been marked as resolved in subsequent core patches. – Bytech Oct 26 '18 at 09:28

1 Answers1

2

The best fix is changing your transaction isolation level (to READ COMMITTED).

Try adding this to your settings.php. It's a common problem in high read/write Drupal sites with many fields.

$databases['default']['default']['init_commands'] = array(
  'isolation' => "SET SESSION tx_isolation='READ-COMMITTED'"
);
Matt Glaman
  • 239
  • 3
  • 14