不能在Magento中重新索引类别产品和其他索引

时间:2014-10-15 14:50:10

标签: sql magento reindex

我有一些不会运行的索引(产品属性,类别产品)和其他似乎正在无休止地处理的索引但是有些运行并快速完成(类别平面数据)。我删除了Var / locks中的锁文件并删除了catalog_product_flat_1和catalog_category_product_index,但索引仍未运行。尝试通过SSH重新索引所有内容时,我收到以下错误

产品属性索引流程未知错误: 异常' PDOException'消息' SQLSTATE [HY000]:常规错误:1205超出锁定等待超时;尝试重启交易'在/home/sites/buzzcateringsupplies.com/public_html/lib/Zend/Db/Statement/Pdo.php:228 堆栈跟踪:

0 /home/sites/buzzcateringsupplies.com/public_html/lib/Zend/Db/Statement/Pdo.php(228):PDOStatement-> execute(Array)

1 /home/sites/buzzcateringsupplies.com/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110):Zend_Db_Statement_Pdo-> _execute(Array)

2 /home/sites/buzzcateringsupplies.com/public_html/lib/Zend/Db/Statement.php(300):Varien_Db_Statement_Pdo_Mysql-> _execute(Array)

3 /home/sites/buzzcateringsupplies.com/public_html/lib/Zend/Db/Adapter/Abstract.php(479):Zend_Db_Statement-> execute(Array)

4 /home/sites/buzzcateringsupplies.com/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238):Zend_Db_Adapter_Abstract->查询(' INSERT INTO`ca ... && #39;,数组)

5 /home/sites/buzzcateringsupplies.com/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419):Zend_Db_Adapter_Pdo_Abstract->查询(' INSERT INTO`ca ... && #39;,数组)

6 /home/sites/buzzcateringsupplies.com/public_html/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php(212):Varien_Db_Adapter_Pdo_Mysql-> query('插入“ca ...')

7 /home/sites/buzzcateringsupplies.com/public_html/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php(72):Mage_CatalogInventory_Model_Resource_Indexer_Stock_Default-> _prepareIndexTable()

8 /home/sites/buzzcateringsupplies.com/public_html/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php(248):Mage_CatalogInventory_Model_Resource_Indexer_Stock_Default-> reindexAll()

9 /home/sites/buzzcateringsupplies.com/public_html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143):Mage_CatalogInventory_Model_Resource_Indexer_Stock-> reindexAll()

10 /home/sites/buzzcateringsupplies.com/public_html/app/code/core/Mage/Index/Model/Process.php(209):Mage_Index_Model_Indexer_Abstract-> reindexAll()

11 /home/sites/buzzcateringsupplies.com/public_html/app/code/core/Mage/Index/Model/Process.php(255):Mage_Index_Model_Process-> reindexAll()

12 /home/sites/buzzcateringsupplies.com/public_html/app/code/core/Mage/Index/Model/Process.php(249):Mage_Index_Model_Process-> reindexEverything()

13 /home/sites/buzzcateringsupplies.com/public_html/shell/indexer.php(158):Mage_Index_Model_Process-> reindexEverything()

14 /home/sites/buzzcateringsupplies.com/public_html/shell/indexer.php(198):Mage_Shell_Compiler-> run()

15 {main}

下一个例外' Zend_Db_Statement_Exception'消息' SQLSTATE [HY000]:常规错误:1205超出锁定等待超时;尝试重启交易'在/home/sites/buzzcateringsupplies.com/public_html/lib/Zend/Db/Statement/Pdo.php:234 堆栈跟踪:

0 /home/sites/buzzcateringsupplies.com/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110):Zend_Db_Statement_Pdo-> _execute(Array)

1 /home/sites/buzzcateringsupplies.com/public_html/lib/Zend/Db/Statement.php(300):Varien_Db_Statement_Pdo_Mysql-> _execute(Array)

2 /home/sites/buzzcateringsupplies.com/public_html/lib/Zend/Db/Adapter/Abstract.php(479):Zend_Db_Statement-> execute(Array)

3 /home/sites/buzzcateringsupplies.com/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238):Zend_Db_Adapter_Abstract->查询(' INSERT INTO`ca ... && #39;,数组)

4 /home/sites/buzzcateringsupplies.com/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419):Zend_Db_Adapter_Pdo_Abstract->查询(' INSERT INTO`ca ... && #39;,数组)

5 /home/sites/buzzcateringsupplies.com/public_html/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php(212):Varien_Db_Adapter_Pdo_Mysql-> query('插入“ca ...')

6 /home/sites/buzzcateringsupplies.com/public_html/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php(72):Mage_CatalogInventory_Model_Resource_Indexer_Stock_Default-> _prepareIndexTable()

7 /home/sites/buzzcateringsupplies.com/public_html/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php(248):Mage_CatalogInventory_Model_Resource_Index

1 个答案:

答案 0 :(得分:0)

我要尝试的第一件事是为您的Magento商店表格优化/分析/修复程序(例如,通过phpmyadmin)。

如果禁用平面目录和产品数据,是否会运行索引?

您的商店有多少种产品?如果有很多产品,也许你需要调整你的MYSQL。