Skip to content

deadlock messenger #39041

Closed
Closed
@pboethig

Description

@pboethig

Hi There,

I try to run message:consume. After a while and 4-6 processes a deadlock occures

How can I catch the deadlock?
And how can I requeue the message?

The problem is, that the error is not catchable by the businesslayer

[2020-11-09T19:52:19.286652+00:00] console.ERROR: Error thrown while running command "'me:co'". Message: "An exception occurred while executing 'DELETE FROM messenger_messages WHERE id = ?' with params ["561550"]: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction" {"exception":"[object] (Symfony\Component\Messenger\Exception\TransportException(code: 0): An exception occurred while executing 'DELETE FROM messenger_messages WHERE id = ?' with params ["561550"]:\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /app/ujw2iilt2tiem/vendor/symfony/doctrine-messenger/Transport/Connection.php:227)\n[previous exception] [object] (Doctrine\DBAL\Exception\DeadlockException(code: 0): An exception occurred while executing 'DELETE FROM messenger_messages WHERE id = ?' with params ["561550"]:\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /app/ujw2iilt2tiem/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:51)\n[previous exception] [object] (Doctrine\DBAL\Driver\PDO\Exception(code: 40001): SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /app/ujw2iilt2tiem/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18)\n[previous exception] [object] (PDOException(code: 40001): SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /app/ujw2iilt2tiem/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115)","command":"'me:co'","message":"An exception occurred while executing 'DELETE FROM messenger_messages WHERE id = ?' with params ["561550"]:\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions