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}


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值