CLI-Worker und SitemapMessage Problem

Hallo,

ich habe bei mir den CLI Worker eingrichtet und lief auch ganz gut.
V 6.3.5.2
Aber seit 2 Tage bekomme ich nun folgende Meldung

// The worker will automatically exit once it has been running for 295s or
// received a stop signal via the messenger:stop-workers command.

// Quit the worker with CONTROL-C.

// Re-run the command with a -vv option to see logs about consumed messages.

12:15:01 CRITICAL [messenger] Error thrown while handling message Shopware\Core\Content\Sitemap\ScheduledTask\SitemapMessage. Removing from transport after 3 retries. Error: „An exception occurred while executing '\n UPDATE message_queue_stats\n SET size = size - 1\n WHERE name = ?;\n ’ with params [„Shopware\Core\Content\Sitemap\ScheduledTask\SitemapMessage“]:\n\nSQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT check.message_queue_stats.size failed for c1w2db1.message_queue_stats“ [„message“ => Shopware\Core\Content\Sitemap\ScheduledTask\SitemapMessage { …},„class“ => „Shopware\Core\Content\Sitemap\ScheduledTask\SitemapMessage“,„retryCount“ => 3,„error“ => „“" An exception occurred while executing '\n UPDATE message_queue_stats\n SET size = size - 1\n WHERE name = ?;\n ’ with params [„Shopware\Core\Content\Sitemap\ScheduledTask\SitemapMessage“]:\n \n SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT check.message_queue_stats.size failed for c1w2db1.message_queue_stats „“",„exception“ => Doctrine\DBAL\Exception\DriverException { …}]
12:15:01 CRITICAL [console] Error thrown while running command „messenger:consume --time-limit=295“. Message: „An exception occurred while executing '\n UPDATE message_queue_stats\n SET size = size - 1\n WHERE name = ?;\n ’ with params [„Shopware\Core\Content\Sitemap\ScheduledTask\SitemapMessage“]:\n\nSQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT check.message_queue_stats.size failed for c1w2db1.message_queue_stats“ [„exception“ => Doctrine\DBAL\Exception\DriverException { …},„command“ => „messenger:consume --time-limit=295“,„message“ => „“" An exception occurred while executing '\n UPDATE message_queue_stats\n SET size = size - 1\n WHERE name = ?;\n ’ with params [„Shopware\Core\Content\Sitemap\ScheduledTask\SitemapMessage“]:\n \n SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT check.message_queue_stats.size failed for c1w2db1.message_queue_stats „“"]

In AbstractMySQLDriver.php line 106:

An exception occurred while executing ’
UPDATE message_queue_stats
SET size = size - 1
WHERE name = ?;
’ with params [„Shopware\Core\Content\Sitemap\ScheduledTask\Si
temapMessage“]:

SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT check.mes sage_queue_stats.size failed for c1w2db1.message_queue_stats

In PDOStatement.php line 123:

SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT check.mes sage_queue_stats.size failed for c1w2db1.message_queue_stats

In PDOStatement.php line 121:

SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT check.mes sage_queue_stats.size failed for c1w2db1.message_queue_stats

messenger:consume [-l|–limit LIMIT] [-m|–memory-limit MEMORY-LIMIT] [-t|–time-limit TIME-LIMIT] [–sleep SLEEP] [-b|–bus BUS] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–] […]

Mein Aufruf
[php] -d memory_limit=1024M [web_root]/bin/console messenger:consume --time-limit=295

In der Message Queue für Sitemap steht size 0 drin.
„id“: „938ca19882654cdbad2bd092e3c70266“,
„type“: „message_queue_stats“,
„attributes“: {
„name“: „Shopware\Core\Content\Sitemap\ScheduledTask\SitemapMessage“,
„size“: 0,
„createdAt“: „2021-01-22T13:42:24.928+00:00“,
„updatedAt“: „2021-03-02T06:35:59.450+00:00“,
„apiAlias“: null

Die Sitemap Generierung habe auf manuell stehen.

Was kann ich tuen ?

Gruss

[2021-05-03 15:04:57] messenger.CRITICAL: Error thrown while handling message Shopware\Core\Content\Sitemap\ScheduledTask\SitemapMessage. Removing from transport after 3 retries. Error: "An exception occurred while executing '             UPDATE `message_queue_stats`             SET `size` = `size` - 1             WHERE `name` = ?;         ' with params ["Shopware\\Core\\Content\\Sitemap\\ScheduledTask\\SitemapMessage"]:  SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `check.message_queue_stats.size` failed for `sw_demo`.`message_queue_stats`" {"message":"[object] (Shopware\\Core\\Content\\Sitemap\\ScheduledTask\\SitemapMessage: {})","class":"Shopware\\Core\\Content\\Sitemap\\ScheduledTask\\SitemapMessage","retryCount":3,"error":"An exception occurred while executing '\n            UPDATE `message_queue_stats`\n            SET `size` = `size` - 1\n            WHERE `name` = ?;\n        ' with params [\"Shopware\\\\Core\\\\Content\\\\Sitemap\\\\ScheduledTask\\\\SitemapMessage\"]:\n\nSQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `check.message_queue_stats.size` failed for `sw_demo`.`message_queue_stats`","exception":"[object] (Doctrine\\DBAL\\Exception\\DriverException(code: 0): An exception occurred while executing '\n            UPDATE `message_queue_stats`\n            SET `size` = `size` - 1\n            WHERE `name` = ?;\n        ' with params [\"Shopware\\\\Core\\\\Content\\\\Sitemap\\\\ScheduledTask\\\\SitemapMessage\"]:\n\nSQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `check.message_queue_stats.size` failed for `sw_demo`.`message_queue_stats` at /srv/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:106, Doctrine\\DBAL\\Driver\\PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `check.message_queue_stats.size` failed for `sw_demo`.`message_queue_stats` at /srv/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:123, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `check.message_queue_stats.size` failed for `sw_demo`.`message_queue_stats` at /srv/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:121)"} []

[2021-05-03 15:04:58] console.CRITICAL: Error thrown while running command "messenger:consume --time-limit=295 --memory-limit=1024M". Message: "An exception occurred while executing '             UPDATE `message_queue_stats`             SET `size` = `size` - 1             WHERE `name` = ?;         ' with params ["Shopware\\Core\\Content\\Sitemap\\ScheduledTask\\SitemapMessage"]:  SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `check.message_queue_stats.size` failed for `sw_demo`.`message_queue_stats`" {"exception":"[object] (Doctrine\\DBAL\\Exception\\DriverException(code: 0): An exception occurred while executing '\n            UPDATE `message_queue_stats`\n            SET `size` = `size` - 1\n            WHERE `name` = ?;\n        ' with params [\"Shopware\\\\Core\\\\Content\\\\Sitemap\\\\ScheduledTask\\\\SitemapMessage\"]:\n\nSQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `check.message_queue_stats.size` failed for `sw_demo`.`message_queue_stats` at /srv/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:106, Doctrine\\DBAL\\Driver\\PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `check.message_queue_stats.size` failed for `sw_demo`.`message_queue_stats` at /srv/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:123, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `check.message_queue_stats.size` failed for `sw_demo`.`message_queue_stats` at /srv/www/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:121)","command":"messenger:consume --time-limit=295 --memory-limit=1024M","message":"An exception occurred while executing '\n            UPDATE `message_queue_stats`\n            SET `size` = `size` - 1\n            WHERE `name` = ?;\n        ' with params [\"Shopware\\\\Core\\\\Content\\\\Sitemap\\\\ScheduledTask\\\\SitemapMessage\"]:\n\nSQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `check.message_queue_stats.size` failed for `sw_demo`.`message_queue_stats`"} []

habe das selbe Problem jemand Ahnung warum das passiert bzw. wie man das lösen kann sofern das kein Bug von SW ist? Habe die aktuellste Version bzw. habe ich mich damals6.1 upgegraded

Bei mir auch in diversen Installationen. Keine Ahnung woher das kommt.

Hier besteht das gleiche Problem mit Shopware\Core\Content\Media\DataAbstractionLayer\MediaIndexingMessage. Es wird anscheinend versucht size auf 0 - 1 zu setzen, was aber vermutlich nicht erlaubt ist.
Hat das schon jemand gelöst bekommen?

Das Problem scheint mit 6.4.2.1 durch Ticket NEXT-16461 gelöst zu sein. Da ist wohl ein Update fällig. :sweat_smile: