Deadlock on semaphore table when writing a cache collector.

Created on 1 June 2018, about 6 years ago
Updated 23 May 2023, about 1 year ago

Here is the error message

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: INSERT INTO {semaphore} (name, value, expire) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => state:Drupal\Core\Cache\CacheCollector [:db_insert_placeholder_1] => 9924356965b0ed832163486.65656809 [:db_insert_placeholder_2] => 1527699536.0902 ) in Drupal\Core\Cache\CacheCollector->updateCache() (line 233 of /var/www/myproject/web/core/lib/Drupal/Core/Cache/CacheCollector.php) #0 /var/www/myproject/web/core/lib/Drupal/Core/Database/Connection.php(657): Drupal\Core\Database\Connection->handleQueryException(Object(PDOException), 'INSERT INTO {se...', Array, Array) #1 /var/www/myproject/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(87): Drupal\Core\Database\Connection->query('INSERT INTO {se...', Array, Array) #2 /var/www/myproject/web/core/lib/Drupal/Core/Database/Driver/mysql/Insert.php(32): Drupal\Core\Database\Driver\mysql\Connection->query('INSERT INTO {se...', Array, Array) #3 /var/www/myproject/web/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php(77): Drupal\Core\Database\Driver\mysql\Insert->execute() #4 /var/www/myproject/web/core/lib/Drupal/Core/ProxyClass/Lock/DatabaseLockBackend.php(75): Drupal\Core\Lock\DatabaseLockBackend->acquire('state:Drupal\\Co...', 30) #5 /var/www/myproject/web/core/lib/Drupal/Core/Cache/CacheCollector.php(233): Drupal\Core\ProxyClass\Lock\DatabaseLockBackend->acquire('state:Drupal\\Co...') #6 /var/www/myproject/web/core/lib/Drupal/Core/Cache/CacheCollector.php(327): Drupal\Core\Cache\CacheCollector->updateCache() #7 /var/www/myproject/web/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php(51): Drupal\Core\Cache\CacheCollector->destruct() #8 [internal function]: Drupal\Core\EventSubscriber\KernelDestructionSubscriber->onKernelTerminate(Object(Symfony\Component\HttpKernel\Event\PostResponseEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #9 /var/www/myproject/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\PostResponseEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #10 /var/www/myproject/vendor/symfony/http-kernel/HttpKernel.php(88): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.terminat...', Object(Symfony\Component\HttpKernel\Event\PostResponseEvent)) #11 /var/www/myproject/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\HttpFoundation\Response)) #12 /var/www/myproject/web/core/lib/Drupal/Core/DrupalKernel.php(642): Stack\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\HttpFoundation\Response)) #13 /var/www/myproject/web/index.php(22): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\HttpFoundation\Response)) #14 {main}.

πŸ› Bug report
Status

Closed: cannot reproduce

Version

9.5

Component
CacheΒ  β†’

Last updated about 9 hours ago

Created by

πŸ‡§πŸ‡ͺBelgium bendev

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.

  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" years ago.

    Since there was no additional information provided since the issue was requested last year, I'm marking the issue "Closed (cannot reproduce)". If anyone can provide complete steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active" [or "Needs Work" if it has a patch, etc.].

    Thanks!

Production build 0.69.0 2024