0
Cron error while executing catalogrule_apply_all:

exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction' in /domains/domainsmain/http/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /domains/domainsmain/http/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /domains/domainsmain/http/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /domains/domainsmain/http/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /domains/domainsmain/http/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#4 /domains/domainsmain/http/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DELETE FROM `ca...', Array)
#5 /domains/domainsmain/http/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('DELETE FROM `ca...', Array)
#6 /domains/domainsmain/http/lib/Zend/Db/Adapter/Abstract.php(664): Varien_Db_Adapter_Pdo_Mysql->query('DELETE FROM `ca...')
#7 /domains/domainsmain/http/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php(164): Zend_Db_Adapter_Abstract->delete('catalogrule_pro...', Array)
#8 /domains/domainsmain/http/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php(344): Mage_CatalogRule_Model_Resource_Rule->cleanProductData('15')
#9 [internal function]: Mage_CatalogRule_Model_Resource_Rule->updateRuleProductData(Object(Mage_CatalogRule_Model_Rule))
#10 /domains/domainsmain/http/lib/Varien/Data/Collection.php(466): call_user_func_array(Array, Array)
#11 /domains/domainsmain/http/app/code/core/Mage/CatalogRule/Model/Rule.php(317): Varien_Data_Collection->walk(Array)
#12 /domains/domainsmain/http/app/code/core/Mage/CatalogRule/Model/Observer.php(263): Mage_CatalogRule_Model_Rule->applyAll()
#13 [internal function]: Mage_CatalogRule_Model_Observer->dailyCatalogUpdate(Object(Aoe_Scheduler_Model_Schedule))
#14 /domains/domainsmain/http/app/code/community/Aoe/Scheduler/Model/Schedule.php(151): call_user_func_array(Array, Array)
#15 /domains/domainsmain/http/app/code/community/Aoe/Scheduler/Model/Schedule.php(510): Aoe_Scheduler_Model_Schedule->runNow(true)
#16 /domains/domainsmain/http/app/code/community/Aoe/Scheduler/Model/Observer.php(39): Aoe_Scheduler_Model_Schedule->process()
#17 /domains/domainsmain/http/app/code/core/Mage/Core/Model/App.php(1358): Aoe_Scheduler_Model_Observer->dispatch(Object(Varien_Event_Observer))
#18 /domains/domainsmain/http/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Aoe_Scheduler_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#19 /domains/domainsmain/http/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#20 /domains/domainsmain/http/cron.php(78): Mage::dispatchEvent('default')
#21 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: DELETE FROM `catalogrule_product` WHERE (rule_id = '15')' in /domains/domainsmain/http/lib/Zend/Db/Statement/Pdo.php:235
Stack trace:
#0 /domains/domainsmain/http/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /domains/domainsmain/http/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /domains/domainsmain/http/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /domains/domainsmain/http/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DELETE FROM `ca...', Array)
#4 /domains/domainsmain/http/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('DELETE FROM `ca...', Array)
#5 /domains/domainsmain/http/lib/Zend/Db/Adapter/Abstract.php(664): Varien_Db_Adapter_Pdo_Mysql->query('DELETE FROM `ca...')
#6 /domains/domainsmain/http/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php(164): Zend_Db_Adapter_Abstract->delete('catalogrule_pro...', Array)
#7 /domains/domainsmain/http/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php(344): Mage_CatalogRule_Model_Resource_Rule->cleanProductData('15')
#8 [internal function]: Mage_CatalogRule_Model_Resource_Rule->updateRuleProductData(Object(Mage_CatalogRule_Model_Rule))
#9 /domains/domainsmain/http/lib/Varien/Data/Collection.php(466): call_user_func_array(Array, Array)
#10 /domains/domainsmain/http/app/code/core/Mage/CatalogRule/Model/Rule.php(317): Varien_Data_Collection->walk(Array)
#11 /domains/domainsmain/http/app/code/core/Mage/CatalogRule/Model/Observer.php(263): Mage_CatalogRule_Model_Rule->applyAll()
#12 [internal function]: Mage_CatalogRule_Model_Observer->dailyCatalogUpdate(Object(Aoe_Scheduler_Model_Schedule))
#13 /domains/domainsmain/http/app/code/community/Aoe/Scheduler/Model/Schedule.php(151): call_user_func_array(Array, Array)
#14 /domains/domainsmain/http/app/code/community/Aoe/Scheduler/Model/Schedule.php(510): Aoe_Scheduler_Model_Schedule->runNow(true)
#15 /domains/domainsmain/http/app/code/community/Aoe/Scheduler/Model/Observer.php(39): Aoe_Scheduler_Model_Schedule->process()
#16 /domains/domainsmain/http/app/code/core/Mage/Core/Model/App.php(1358): Aoe_Scheduler_Model_Observer->dispatch(Object(Varien_Event_Observer))
#17 /domains/domainsmain/http/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Aoe_Scheduler_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#18 /domains/domainsmain/http/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#19 /domains/domainsmain/http/cron.php(78): Mage::dispatchEvent('default')
#20 {main}

This is what happens when I want to execute this rule, could anyone help me solve this?

  • seems like lot of rule and time out problem, you need to increase time for mysql conenction – Sunil Patel May 10 '17 at 8:28
0

I think you have a lot of rule in magento admin and due to timeout problem, you are getting this issue. Please increase the value of 2 parameters on your server.

innodb_lock_wait_timeout and lock_wait_timeout

For more details please check this link-

https://www.polcode.com/en/the-lock-wait-timeout-exceeded-error-in-magento-find-and-solve-it/

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.