0

Wondering if anyone can help with this. Every few days, the catalogrule_apply_all cron task fails with the exception 'PDOException' with message 'SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction'.

Struggling to figure out what's going on. Our hosting company have done various checks on the database and found no issues but this still keeps happening and causing the shopping cart price rules to fail.

I'm also using AEO Scheduler;

Cron error while executing catalogrule_apply_all:

exception 'PDOException' with message 'SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction' in /var/www/vhosts/domain.tld/htdocs/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /var/www/vhosts/domain.tld/htdocs/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /var/www/vhosts/domain.tld/htdocs/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /var/www/vhosts/domain.tld/htdocs/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /var/www/vhosts/domain.tld/htdocs/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#4 /var/www/vhosts/domain.tld/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#5 /var/www/vhosts/domain.tld/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#6 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh.php(571): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...')
#7 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh.php(590): Mage_CatalogRule_Model_Action_Index_Refresh->_fillIndexData(Object(Mage_Core_Model_Website), 1472511600)
#8 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh.php(126): Mage_CatalogRule_Model_Action_Index_Refresh->_reindex(Object(Mage_Core_Model_Website), 1472511600)
#9 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php(592): Mage_CatalogRule_Model_Action_Index_Refresh->execute()
#10 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php(545): Mage_CatalogRule_Model_Resource_Rule->_reindexCatalogRule(NULL)
#11 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/CatalogRule/Model/Observer.php(204): Mage_CatalogRule_Model_Resource_Rule->applyAllRules()
#12 [internal function]: Mage_CatalogRule_Model_Observer->dailyCatalogUpdate(Object(Aoe_Scheduler_Model_Schedule))
#13 /var/www/vhosts/domain.tld/htdocs/app/code/community/Aoe/Scheduler/Model/Observer.php(79): call_user_func_array(Array, Array)
#14 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/Core/Model/App.php(1338): Aoe_Scheduler_Model_Observer->dispatch(Object(Varien_Event_Observer))
#15 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Aoe_Scheduler_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#16 /var/www/vhosts/domain.tld/htdocs/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#17 /var/www/vhosts/domain.tld/htdocs/cron.php(75): Mage::dispatchEvent('default')
#18 {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 /var/www/vhosts/domain.tld/htdocs/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /var/www/vhosts/domain.tld/htdocs/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/vhosts/domain.tld/htdocs/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/vhosts/domain.tld/htdocs/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /var/www/vhosts/domain.tld/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#4 /var/www/vhosts/domain.tld/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#5 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh.php(571): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...')
#6 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh.php(590): Mage_CatalogRule_Model_Action_Index_Refresh->_fillIndexData(Object(Mage_Core_Model_Website), 1472511600)
#7 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh.php(126): Mage_CatalogRule_Model_Action_Index_Refresh->_reindex(Object(Mage_Core_Model_Website), 1472511600)
#8 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php(592): Mage_CatalogRule_Model_Action_Index_Refresh->execute()
#9 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php(545): Mage_CatalogRule_Model_Resource_Rule->_reindexCatalogRule(NULL)
#10 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/CatalogRule/Model/Observer.php(204): Mage_CatalogRule_Model_Resource_Rule->applyAllRules()
#11 [internal function]: Mage_CatalogRule_Model_Observer->dailyCatalogUpdate(Object(Aoe_Scheduler_Model_Schedule))
#12 /var/www/vhosts/domain.tld/htdocs/app/code/community/Aoe/Scheduler/Model/Observer.php(79): call_user_func_array(Array, Array)
#13 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/Core/Model/App.php(1338): Aoe_Scheduler_Model_Observer->dispatch(Object(Varien_Event_Observer))
#14 /var/www/vhosts/domain.tld/htdocs/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Aoe_Scheduler_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#15 /var/www/vhosts/domain.tld/htdocs/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#16 /var/www/vhosts/domain.tld/htdocs/cron.php(75): Mage::dispatchEvent('default')
#17 {main}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.