Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization Issues -- Cache and Cron #178

Open
alliomeria opened this issue Apr 25, 2022 · 0 comments
Open

Serialization Issues -- Cache and Cron #178

alliomeria opened this issue Apr 25, 2022 · 0 comments
Assignees
Labels
bug Something isn't working Drupal9 Drupal9 is the new Drupal8 which was the new Drupal7 wich was the...

Comments

@alliomeria
Copy link
Contributor

What?

Due to a known Drupal issue https://www.drupal.org/project/drupal/issues/2833539, users may encounter 'Serialization failure: 1213 Deadlock' errors when executing large batch actions (such as changing the moderation state of several thousand digital objects).

Example:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=272&op=do_nojs&op=do StatusText: 500 Service unavailable (with message) ResponseText: The website encountered an unexpected error. Please try again later.Drupal\Core\Entity\EntityStorageException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: INSERT INTO "cache_default" ("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] => s3fs:uri:s3://dostorage/1de279a4-ad78-4826-842a-bae8ab8ed574 [:db_insert_placeholder_1] => -1 [:db_insert_placeholder_2] => 1650906792.942 [:db_insert_placeholder_3] => s3fs [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => a:5:{s:3:"uri";s:51:"s3://dostorage/1de279a4-ad78-4826-842a-bae8ab8ed574";s:8:"filesize";s:1:"0";s:9:"timestamp";s:10:"1650568327";s:3:"dir";s:1:"1";s:7:"version";s:0:"";} [:db_insert_placeholder_6] => 1 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 811 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

How to work around this?

Temporary solution: (may help/be sufficient for most cases) disable Cron prior to executing large batch actions
Longer term solution: under consideration by @DiegoPino. 👾 🤔

@alliomeria alliomeria added bug Something isn't working Drupal9 Drupal9 is the new Drupal8 which was the new Drupal7 wich was the... labels Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Drupal9 Drupal9 is the new Drupal8 which was the new Drupal7 wich was the...
Projects
None yet
Development

No branches or pull requests

2 participants