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

SQLState deadlock seen on occasion in development environment #446

Open
bseeger opened this issue Nov 11, 2021 · 1 comment
Open

SQLState deadlock seen on occasion in development environment #446

bseeger opened this issue Nov 11, 2021 · 1 comment
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@bseeger
Copy link

bseeger commented Nov 11, 2021

This has been seen in the development environment. This has NOT been seen in the cloud environments yet, so we are not sure how big of a deal this is yet.

Sometimes this error will be found in the Drupal log (or statements like it - main part is that it's happening when updating the cache_entity table):

172.19.0.7 - - [11/Nov/2021:20:08:46 +0000] "GET /migrate_source_ui HTTP/1.1" 200 81587 "https://islandora-idc.traefik.me/batch?id=537&op=start" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36" "172.19.0.14"
NOTICE: PHP message: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\HttpException: "SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: INSERT INTO "cache_entity" ("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] => values:file:590
    [:db_insert_placeholder_1] => -1
    [:db_insert_placeholder_2] => 1636661326.852
    [:db_insert_placeholder_3] => entity_field_info file_values
    [:db_insert_placeholder_4] => 1749
    [:db_insert_placeholder_5] => O:23:"Drupal\file\Entity\File":28:{s:9:"
2021/11/11 20:08:46 [error] 835#835: *825 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\HttpException: "SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: INSERT INTO "cache_entity" ("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] => values:file:590
    [:db_insert_placeholder_1] => -1
    [:db_insert_placeholder_2] => 1636661326.852
    [:db_insert_placeholder_3] => entity_field_info file_values
    [:db_insert_placeholder_4] => 1749
    [:db_insert_placeholder_5] => O:23:"Drupal\file\Entity\File":28:{s:9:"" while reading response header from upstream, client: 172.19.0.7, server: drupal, request: "PUT /node/57/media/image/19 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm7/php-fpm7.sock:", host: "islandora-idc.traefik.me"

The system seems to recover okay, however, but if it happens when the CI system is running the tests will fail because they hit timeouts before the system recovers.

Turns out it's an old an known issue:

Right now we are opting to not do anything about it, but are noting the issue and some resources we might want to use to solve it if we need to.

@bseeger bseeger added bug Something isn't working wontfix This will not be worked on labels Nov 11, 2021
@bseeger
Copy link
Author

bseeger commented Nov 11, 2021

noting: https://www.drupal.org/node/1952972

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant