AOEpeople / Aoe_Scheduler

Cron Scheduler Module for Magento
http://fbrnc.net/blog/2011/03/magento-cron-schedule
GNU General Public License v3.0
373 stars 202 forks source link

Issue with update of Aoe_Scheduler. #100

Open leiluspocus opened 9 years ago

leiluspocus commented 9 years ago

We recently upgraded to a new version of Magento Enterprise (EE 1.12 to EE 1.13.1). We updated the module AOE_Scheduler, switching from version 0.3.2 (that was working fine on 1.13.1) to 0.4.4.

We are experiencing the following issue since we updated the module.

Cron error while executing enterprise_refresh_index:

exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table '.catalog_category_product_index_tmp' doesn't exist' in /my_website/lib/Zend/Db/Statement/Pdo.php:228 Stack trace:

0 /my_website/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)

1 /my_website/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)

2 /my_website/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)

3 /my_website/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)

4 /my_website/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT IGNORE I...', Array)

5 /my_website/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT IGNORE I...', Array)

6 /my_website/app/code/core/Enterprise/Catalog/Model/Index/Action/Catalog/Category/Product/Refresh.php(747): Varien_Db_Adapter_Pdo_Mysql->query('INSERT IGNORE I...')

7 /my_website/app/code/core/Enterprise/Catalog/Model/Index/Action/Catalog/Category/Product/Refresh.php(396): Enterprise_Catalog_Model_Index_Action_Catalog_Category_Product_Refresh->_reindexAnchorCategories(Object(Mage_Core_Model_Store))

8 /my_website/app/code/core/Enterprise/Catalog/Model/Index/Action/Catalog/Category/Product/Refresh.php(170): Enterprise_Catalog_Model_Index_Action_Catalog_Category_Product_Refresh->_reindex()

9 /my_website/app/code/core/Enterprise/Mview/Model/Client.php(109): Enterprise_Catalog_Model_Index_Action_Catalog_Category_Product_Refresh->execute()

10 /my_website/app/code/core/Enterprise/Index/Model/Observer.php(117): Enterprise_Mview_Model_Client->execute('enterprise_cata...')

11 [internal function]: Enterprise_Index_Model_Observer->refreshIndex(Object(Aoe_Scheduler_Model_Schedule))

12 /my_website/app/code/community/Aoe/Scheduler/Model/Schedule.php(122): call_user_func_array(Array, Array)

13 /my_website/app/code/local//Cron/Model/Observer.php(43): Aoe_Scheduler_Model_Schedule->runNow(false)

14 /my_website/app/code/core/Mage/Cron/Model/Observer.php(262): _Cron_Model_Observer->_processJob(Object(Aoe_Scheduler_Model_Schedule), Object(Mage_Core_Model_Config_Element), true)

15 /my_website/app/code/core/Mage/Cron/Model/Observer.php(89): Mage_Cron_Model_Observer->_processAlwaysTask('enterprise_refr...', Object(Mage_Core_Model_Config_Element))

16 /my_website/app/code/community/Aoe/Scheduler/Model/Observer.php(69): Mage_Cron_Model_Observer->dispatchAlways(Object(Varien_Event_Observer))

17 /my_website/app/code/local/Mage/Core/Model/App.php(1354): Aoe_Scheduler_Model_Observer->dispatchAlways(Object(Varien_Event_Observer))

18 /my_website/app/code/local/Mage/Core/Model/App.php(1333): Mage_Core_Model_App->_callObserverMethod(Object(_Cron_Model_Observer), 'dispatchAlways', Object(Varien_Event_Observer))

19 /my_website/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('always', Array)

20 /my_website/cron.php(76): Mage::dispatchEvent('always')

21 {main}

We disabled our override [see step 13 in the stack], thinking it was the origin of the issue, but the error is still raised. We noticed that the table 'catalog_category_product_index_tmp' doesn't exist in 1.13 (but existed in 1.12).

Any idea where this could come from ?

Thank you for your help !

fbrnc commented 9 years ago

Hi @leiluspocus,

here are some thoughts:

I hope this helps.

Have a great day, Fabrizio

leiluspocus commented 9 years ago

Thank you so much for your answer @fbrnc !

It's a legacy override that I found in the app we are migrating ( See line 44: https://gist.github.com/leiluspocus/4f9f3b2dd393b9b2b462 - made in the 0.3.2 version ).

The commit message the developer left isn't clear at all, so I honestly have no idea why he did this. I guess he wanted jobs to be launched even if it was too late according to the schedule ? Was it a known bug that has been fixed in the new version ?

janagiram commented 8 years ago

I am using Magento EE 1.14.2.0 and AOE Scheduler 1.5.0 , but the same issue I have faced still now. Later, I have downgraded the AOE Scheduler 1.3.1. But still this issue continues in the lower version also.