Problem deutet auf Datenbank hin/An exception occurred while executing

Hallo zusammmen,
wir bekommen nun folgendes Problem. Habt ihr hierzu eine Idee?

Uncaught PHP Exception Doctrine\DBAL\Exception\DeadlockException: „An exception occurred while executing ‚DELETE FROM pickware_erp_order_pickability WHERE order_id IN ( SELECT order.id FROM order LEFT JOIN state_machine_state AS order_state ON order.state_id = order_state.id LEFT JOIN pickware_shopware_extensions_order_configuration AS orderConfiguration ON order.id = orderConfiguration.order_id AND order.version_id = orderConfiguration.order_version_id LEFT JOIN order_delivery ON order_delivery.id = orderConfiguration.primary_order_delivery_id AND order_delivery.version_id = orderConfiguration.primary_order_delivery_version_id LEFT JOIN state_machine_state AS orderDeliveryState ON order_delivery.state_id = orderDeliveryState.id WHERE (order_state.technical_name IN (?, ?) OR orderDeliveryState.technical_name IN (?, ?)) AND order.id IN (?) )‘ with params [„cancelled“, „completed“, „cancelled“, „shipped“, „\xe6\xe8\x25\x33\xb8\x1a\x46\xd7\xa7\xca\x0e\x7f\x1f\x1d\xa7\x75“]: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction“ at /var/www/clients/client1/web1/web/releases/20220113161245/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 51 {„exception“:„[object] (Doctrine\DBAL\Exception\DeadlockException(code: 0): An exception occurred while executing ‚DELETE FROM pickware_erp_order_pickability\n WHERE order_id IN (\n SELECT\n order.id\n FROM order\n LEFT JOIN state_machine_state AS order_state\n ON order.state_id = order_state.id\n LEFT JOIN pickware_shopware_extensions_order_configuration AS orderConfiguration\n ON order.id = orderConfiguration.order_id\n AND order.version_id = orderConfiguration.order_version_id\n LEFT JOIN order_delivery\n ON order_delivery.id = orderConfiguration.primary_order_delivery_id\n AND order_delivery.version_id = orderConfiguration.primary_order_delivery_version_id\n LEFT JOIN state_machine_state AS orderDeliveryState\n ON order_delivery.state_id = orderDeliveryState.id\n\n WHERE\n (order_state.technical_name IN (?, ?)\n OR orderDeliveryState.technical_name IN (?, ?))\n AND order.id IN (?)\n )‘ with params ["cancelled", "completed", "cancelled", "shipped", "\xe6\xe8\x25\x33\xb8\x1a\x46\xd7\xa7\xca\x0e\x7f\x1f\x1d\xa7\x75"]:\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /var/www/clients/client1/web1/web/releases/20220113161245/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 /var/www/clients/client1/web1/web/releases/20220113161245/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 /var/www/clients/client1/web1/web/releases/20220113161245/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117)“}
Gruß
Markus

Ja, ist ein Deadlock.

Übersetzt auf den konkreten Fall heißt das so viel, etwas kann nicht gelöscht werden, bevor etwas anderes gelöscht wurde. Das wiederum kann nicht gelöscht werden, bevor das vorherige Element nicht gelöscht wurde.

Da hilft vermutlich nur Constrains in der Datenbank aufheben, löschen und Constrains wieder setzen.

@Pickware kontaktieren, könnte an deren Plugin liegen.

Wir haben ein sehr ähnliches Problem… seit dem letzten Update dauert das abarbeiten von Bestellungen über die Mehrfachbearbeitung sehr lang. Unser Error Log läuft voll.

Wir sind noch auf PHP 8.0

Am häufigsten scheint es der Fehler zu sein: Pickware\PickwareErpStarter\OrderPickability\OrderPickabilityCalculator::deleteOrderPickabilitiesOfIgnoredOrders

DELETE FROM
  pickware_erp_order_pickability

aber wie damit umgehen? @Pickware

Der zwei häufigste Fehler ist: Pickware\PickwareErpStarter\OrderPickability\OrderPickabilityCalculator::recalculateOrderPickabilitiesForOrdersAndWarehouses

UPDATE
  id AS orderId,
  order_product_pickability.warehouse_id AS warehouseId,

dicht gefolgt von:

Pickware\PickwareErpStarter\OrderPickability\OrderPickabilityCalculator::ensureOrderPickabilitiesExist

welche ein echt langsames SQL ist.