Order-Completion: Lock wait timeout exceeded; try restarting transaction;

Created on 10 July 2020, almost 5 years ago
Updated 26 March 2024, about 1 year ago

When i make an order i get following error after checkout takes minutes to be submitted to database:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction: INSERT INTO {cache_config} (cid, expire, created, tags, checksum, data, serialized) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6) ON DUPLICATE KEY UPDATE cid = VALUES(cid), expire = VALUES(expire), created = VALUES(created), tags = VALUES(tags), checksum = VALUES(checksum), data = VALUES(data), serialized = VALUES(serialized); Array ( [:db_insert_placeholder_0] => commerce_number_pattern.commerce_number_pattern.order_default [:db_insert_placeholder_1] => -1 [:db_insert_placeholder_2] => 1594407786.624 [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => a:9:{s:4:"uuid";s:36:"a158a155-88d7-4b5a-b6a1-c5e041cc8b60";s:8:"langcode";s:2:"de";s:6:"status";b:1;s:12:"dependencies";a:0:{}s:2:"id";s:13:"order_default";s:5:"label";s:7:"Default";s:16:"targetEntityType";s:14:"commerce_order";s:6:"plugin";s:7:"monthly";s:13:"configuration";a:4:{s:7:"pattern";s:45:"[pattern:year][pattern:month][pattern:number]";s:14:"initial_number";i:1;s:7:"padding";i:5;s:18:"per_store_sequence";b:1;}} [:db_insert_placeholder_6] => 1 ) in Drupal\Core\Config\CachedStorage->readMultiple() (Zeile 105 in /Users/devtim/Projekte/atlflw/web/core/lib/Drupal/Core/Config/CachedStorage.php).

I already tried to set this in my settings.php:

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

...but nothing changed. has somebody any ideas? it seems like some users have to wait a lot of time until their order is set.

thank you for any hints, best regards tim

🐛 Bug report
Status

Closed: cannot reproduce

Version

2.0

Component

Checkout

Created by

🇩🇪Germany gooddev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇱Israel jsacksick

    The initial report had "commerce_number_pattern" in the backtrace and due to the use of the "lock" API which is no longer used.
    Since then, unrelated other reports were added to this issue, but without reproducible steps or any explanation to why this issue is linked to Commerce?
    Comment #5 is about the "cache_entity" bin, but that would be a core issue I'd say... Also, in general using the db cache backend isn't really the best when it comes to performance (Redis or Memcache would be preferable)...

    @joseph.olstad and @vensires: Which issues are you experiencing? What makes you think this is caused by Commerce?

  • 🇬🇷Greece vensires

    (@jsacksick I haven't run into this exact issue; just changed version to make it more noticeable and decide whether you can close it or it's still related)

  • 🇮🇱Israel jsacksick

    But what issue did you run into? How can we help if we don't even know what this issue is for?

  • 🇬🇷Greece vensires

    I personally believe you can close this as, for me, it seems not related to Commerce specifically.
    Since it was still standing as active from early 2023 I made a small change in order for you to decide what to do with it.

  • Status changed to Closed: cannot reproduce about 1 year ago
Production build 0.71.5 2024