magento索引报错的解决:General error: 1205 Lock wait timeout exceeded

1.

magento在索引的时候用shell,有时候会报错:

General error: 1205 Lock wait timeout exceeded

这个时候,是因为行锁的原因,在表中您直接用sql执行更新,会报这个错,也就是说这个错是mysql报的。

需要吧表index_process解锁

如果您想快速的解决,那么,把表导入,修改,删除数据库中index_process表,重新导入,OK,行锁会消失。

网上也有把index的mode改为手动,索引完改回来,好像还是有问题,报这个错就是mysql行锁的原因,

对了,还有,清空 rm -rf  var/locks/*   .

Product Attributes index process unknown error:
exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction' in /var/www/html/tomtop.com1.7/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /var/www/html/tomtop.com1.7/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /var/www/html/tomtop.com1.7/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /var/www/html/tomtop.com1.7/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /var/www/html/tomtop.com1.7/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /var/www/html/tomtop.com1.7/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('UPDATE `index_p...', Array)
#5 /var/www/html/tomtop.com1.7/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('UPDATE `index_p...', Array)
#6 /var/www/html/tomtop.com1.7/lib/Zend/Db/Adapter/Abstract.php(632): Varien_Db_Adapter_Pdo_Mysql->query('UPDATE `index_p...', Array)
#7 /var/www/html/tomtop.com1.7/app/code/core/Mage/Index/Model/Resource/Process.php(137): Zend_Db_Adapter_Abstract->update('index_process', Array, Array)
#8 /var/www/html/tomtop.com1.7/app/code/core/Mage/Index/Model/Resource/Process.php(93): Mage_Index_Model_Resource_Process->_updateProcessData('1', Array)
#9 /var/www/html/tomtop.com1.7/app/code/core/Mage/Index/Model/Process.php(187): Mage_Index_Model_Resource_Process->startProcess(Object(Mage_Index_Model_Process))
#10 /var/www/html/tomtop.com1.7/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#11 /var/www/html/tomtop.com1.7/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#12 /var/www/html/tomtop.com1.7/shell/indexer.php(198): Mage_Shell_Compiler->run()
#13 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction' in /var/www/html/tomtop.com1.7/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /var/www/html/tomtop.com1.7/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/html/tomtop.com1.7/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/html/tomtop.com1.7/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /var/www/html/tomtop.com1.7/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('UPDATE `index_p...', Array)
#4 /var/www/html/tomtop.com1.7/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('UPDATE `index_p...', Array)
#5 /var/www/html/tomtop.com1.7/lib/Zend/Db/Adapter/Abstract.php(632): Varien_Db_Adapter_Pdo_Mysql->query('UPDATE `index_p...', Array)
#6 /var/www/html/tomtop.com1.7/app/code/core/Mage/Index/Model/Resource/Process.php(137): Zend_Db_Adapter_Abstract->update('index_process', Array, Array)
#7 /var/www/html/tomtop.com1.7/app/code/core/Mage/Index/Model/Resource/Process.php(93): Mage_Index_Model_Resource_Process->_updateProcessData('1', Array)
#8 /var/www/html/tomtop.com1.7/app/code/core/Mage/Index/Model/Process.php(187): Mage_Index_Model_Resource_Process->startProcess(Object(Mage_Index_Model_Process))
#9 /var/www/html/tomtop.com1.7/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#10 /var/www/html/tomtop.com1.7/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#11 /var/www/html/tomtop.com1.7/shell/indexer.php(198): Mage_Shell_Compiler->run()
#12 {main}


你可能感兴趣的:(MAGENTO)