Hallo SW-Community, seit einiger Zeit bekommen wir in unserem Shops Fehlermeldungen, die durch Deadlocks ausgelöst werden. Auffällig ist hierbei, dass es nie die gleiche Query ist, welche den Deadlock auslöst. Da die betroffenen Queries immer aus Core-Dateien stammen, benötige ich einmal Hilfe, wie man das Problem sinnvoll löst, ohne am Shopware-Core rumfummeln zu müssen (was ja bekanntermaßen in Sachen Updatefähigkeit nicht gerade produktiv wäre). Hat jemand eine Idee? Vielleicht auch direkt jemand von :shopware:Shopware? Nachfolgend einmal eine Beispiel-Fehlermeldung, wie ich sie bereits des Öfteren erhalten habe: exception 'PDOException' with message 'SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction' in /mein\_shop\_de/engine/Library/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 /mein\_shop\_de/engine/Library/Zend/Db/Statement/Pdo.php(228): PDOStatement-\>execute(Array) #1 /mein\_shop\_de/engine/Library/Zend/Db/Statement.php(303): Zend\_Db\_Statement\_Pdo-\>\_execute(Array) #2 /mein\_shop\_de/engine/Library/Zend/Db/Adapter/Abstract.php(480): Zend\_Db\_Statement-\>execute(Array) #3 /mein\_shop\_de/engine/Library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend\_Db\_Adapter\_Abstract-\>query('DELETE FROM s\_o...', Array) #4 /mein\_shop\_de/engine/Library/Enlight/Components/Db/Adapter/Pdo/Mysql.php(75): Zend\_Db\_Adapter\_Pdo\_Abstract-\>query('DELETE FROM s\_o...', Array) #5 /mein\_shop\_de/engine/core/class/sBasket.php(290): Enlight\_Components\_Db\_Adapter\_Pdo\_Mysql-\>query('DELETE FROM s\_o...', Array) #6 /mein\_shop\_de/engine/core/class/sBasket.php(996): sBasket-\>sInsertDiscount() #7 /mein\_shop\_de/engine/core/class/sAdmin.php(400): sBasket-\>sGetBasket() #8 /mein\_shop\_de/engine/core/class/sAdmin.php(4634): sAdmin-\>sGetPaymentMeanById('7', Array) #9 /mein\_shop\_de/engine/core/class/sAdmin.php(2656): sAdmin-\>getUserShippingData('2300', Array, 'SELECT c.\*, a.n...') #10 /mein\_shop\_de/engine/core/class/sAdmin.php(3619): sAdmin-\>sGetUserData() #11 /mein\_shop\_de/engine/core/class/sAdmin.php(3701): sAdmin-\>sGetDispatchBasket('2', NULL, NULL) #12 /mein\_shop\_de/engine/Shopware/Controllers/Frontend/Checkout.php(915): sAdmin-\>sGetPremiumDispatches('2', NULL, NULL) #13 /mein\_shop\_de/engine/Shopware/Controllers/Frontend/Checkout.php(110): Shopware\_Controllers\_Frontend\_Checkout-\>getDispatches() #14 [internal function]: Shopware\_Controllers\_Frontend\_Checkout-\>cartAction() #15 /mein\_shop\_de/cache/proxies/ShopwareControllersFrontendCheckoutProxy.php(11): call\_user\_func\_array(Array, Array) #16 /mein\_shop\_de/engine/Library/Enlight/Hook/HookManager.php(191): Shopware\_Proxies\_ShopwareControllersFrontendCheckoutProxy-\>executeParent('cartAction', Array) #17 /mein\_shop\_de/cache/proxies/ShopwareControllersFrontendCheckoutProxy.php(23): Enlight\_Hook\_HookManager-\>executeHooks(Object(Shopware\_Proxies\_ShopwareControllersFrontendCheckoutProxy), 'cartAction', Array) #18 /mein\_shop\_de/engine/Library/Enlight/Controller/Action.php(159): Shopware\_Proxies\_ShopwareControllersFrontendCheckoutProxy-\>cartAction() #19 /mein\_shop\_de/engine/Library/Enlight/Controller/Dispatcher/Default.php(528): Enlight\_Controller\_Action-\>dispatch('cartAction') #20 /mein\_shop\_de/engine/Library/Enlight/Controller/Front.php(228): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #21 /mein\_shop\_de/engine/Shopware/Kernel.php(145): Enlight\_Controller\_Front-\>dispatch() #22 /mein\_shop\_de/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(471): Shopware\Kernel-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /mein\_shop\_de/engine/Shopware/Components/HttpCache/AppCache.php(256): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #24 /mein\_shop\_de/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(428): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true) #25 /mein\_shop\_de/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(328): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>fetch(Object(Symfony\Component\HttpFoundation\Request), true) #26 /mein\_shop\_de/engine/Shopware/Components/HttpCache/AppCache.php(178): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>lookup(Object(Symfony\Component\HttpFoundation\Request), true) #27 /mein\_shop\_de/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(192): Shopware\Components\HttpCache\AppCache-\>lookup(Object(Symfony\Component\HttpFoundation\Request), true) #28 /mein\_shop\_de/engine/Shopware/Components/HttpCache/AppCache.php(113): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #29 /mein\_shop\_de/shopware.php(109): Shopware\Components\HttpCache\AppCache-\>handle(Object(Symfony\Component\HttpFoundation\Request)) #30 {main} Next exception 'Zend\_Db\_Statement\_Exception' with message 'SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction' in /mein\_shop\_de/engine/Library/Zend/Db/Statement/Pdo.php:234 Stack trace: #0 /mein\_shop\_de/engine/Library/Zend/Db/Statement.php(303): Zend\_Db\_Statement\_Pdo-\>\_execute(Array) #1 /mein\_shop\_de/engine/Library/Zend/Db/Adapter/Abstract.php(480): Zend\_Db\_Statement-\>execute(Array) #2 /mein\_shop\_de/engine/Library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend\_Db\_Adapter\_Abstract-\>query('DELETE FROM s\_o...', Array) #3 /mein\_shop\_de/engine/Library/Enlight/Components/Db/Adapter/Pdo/Mysql.php(75): Zend\_Db\_Adapter\_Pdo\_Abstract-\>query('DELETE FROM s\_o...', Array) #4 /mein\_shop\_de/engine/core/class/sBasket.php(290): Enlight\_Components\_Db\_Adapter\_Pdo\_Mysql-\>query('DELETE FROM s\_o...', Array) #5 /mein\_shop\_de/engine/core/class/sBasket.php(996): sBasket-\>sInsertDiscount() #6 /mein\_shop\_de/engine/core/class/sAdmin.php(400): sBasket-\>sGetBasket() #7 /mein\_shop\_de/engine/core/class/sAdmin.php(4634): sAdmin-\>sGetPaymentMeanById('7', Array) #8 /mein\_shop\_de/engine/core/class/sAdmin.php(2656): sAdmin-\>getUserShippingData('2300', Array, 'SELECT c.\*, a.n...') #9 /mein\_shop\_de/engine/core/class/sAdmin.php(3619): sAdmin-\>sGetUserData() #10 /mein\_shop\_de/engine/core/class/sAdmin.php(3701): sAdmin-\>sGetDispatchBasket('2', NULL, NULL) #11 /mein\_shop\_de/engine/Shopware/Controllers/Frontend/Checkout.php(915): sAdmin-\>sGetPremiumDispatches('2', NULL, NULL) #12 /mein\_shop\_de/engine/Shopware/Controllers/Frontend/Checkout.php(110): Shopware\_Controllers\_Frontend\_Checkout-\>getDispatches() #13 [internal function]: Shopware\_Controllers\_Frontend\_Checkout-\>cartAction() #14 /mein\_shop\_de/cache/proxies/ShopwareControllersFrontendCheckoutProxy.php(11): call\_user\_func\_array(Array, Array) #15 /mein\_shop\_de/engine/Library/Enlight/Hook/HookManager.php(191): Shopware\_Proxies\_ShopwareControllersFrontendCheckoutProxy-\>executeParent('cartAction', Array) #16 /mein\_shop\_de/cache/proxies/ShopwareControllersFrontendCheckoutProxy.php(23): Enlight\_Hook\_HookManager-\>executeHooks(Object(Shopware\_Proxies\_ShopwareControllersFrontendCheckoutProxy), 'cartAction', Array) #17 /mein\_shop\_de/engine/Library/Enlight/Controller/Action.php(159): Shopware\_Proxies\_ShopwareControllersFrontendCheckoutProxy-\>cartAction() #18 /mein\_shop\_de/engine/Library/Enlight/Controller/Dispatcher/Default.php(528): Enlight\_Controller\_Action-\>dispatch('cartAction') #19 /mein\_shop\_de/engine/Library/Enlight/Controller/Front.php(228): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #20 /mein\_shop\_de/engine/Shopware/Kernel.php(145): Enlight\_Controller\_Front-\>dispatch() #21 /mein\_shop\_de/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(471): Shopware\Kernel-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /mein\_shop\_de/engine/Shopware/Components/HttpCache/AppCache.php(256): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #23 /mein\_shop\_de/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(428): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true) #24 /mein\_shop\_de/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(328): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>fetch(Object(Symfony\Component\HttpFoundation\Request), true) #25 /mein\_shop\_de/engine/Shopware/Components/HttpCache/AppCache.php(178): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>lookup(Object(Symfony\Component\HttpFoundation\Request), true) #26 /mein\_shop\_de/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(192): Shopware\Components\HttpCache\AppCache-\>lookup(Object(Symfony\Component\HttpFoundation\Request), true) #27 /mein\_shop\_de/engine/Shopware/Components/HttpCache/AppCache.php(113): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /mein\_shop\_de/shopware.php(109): Shopware\Components\HttpCache\AppCache-\>handle(Object(Symfony\Component\HttpFoundation\Request)) #29 {main} 2015-08-15T16:03:50.526465+0200 core { "uri": "/checkout/cart", "method": "GET", "query": { "controller": "checkout", "action": "cart" }, "post": [] }