我在现场的Magento商店遇到了以下问题。
在我为我的2个商店之一(多线程设置)创建新类别后,我无法重新索引URL重写。我已经清空了数据库中的core_url_rewrite表,清除了var / locks文件夹并尝试重新索引,但它没有任何区别。
当我看一下exeption.log时,它会给出以下异常。
2013-12-10T11:06:50+00:00 DEBUG (7): Exception message: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction
Trace: #0 /home/users/hertwftp/hertog-hengelsport.nl/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/users/hertwftp/hertog-hengelsport.nl/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/users/hertwftp/hertog-hengelsport.nl/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’DELETE FROM `ma...’, Array)
#4 /home/users/hertwftp/hertog-hengelsport.nl/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query(’DELETE FROM `ma...’, Array)
#5 /home/users/hertwftp/hertog-hengelsport.nl/lib/Zend/Db/Adapter/Abstract.php(661): Varien_Db_Adapter_Pdo_Mysql->query(’DELETE FROM `ma...’)
#6 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Catalog/Model/Resource/Url.php(1135): Zend_Db_Adapter_Abstract->delete(’magcore_url_rew...’, Array)
#7 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Catalog/Model/Resource/Url.php(1194): Mage_Catalog_Model_Resource_Url->clearStoreCategoriesInvalidRewrites(’1’)
#8 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Catalog/Model/Url.php(596): Mage_Catalog_Model_Resource_Url->clearStoreInvalidRewrites(’1’)
#9 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Catalog/Model/Url.php(253): Mage_Catalog_Model_Url->clearStoreInvalidRewrites(’1’)
#10 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Catalog/Model/Url.php(248): Mage_Catalog_Model_Url->refreshRewrites(’1’)
#11 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Catalog/Model/Indexer/Url.php(257): Mage_Catalog_Model_Url->refreshRewrites()
#12 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Index/Model/Process.php(210): Mage_Catalog_Model_Indexer_Url->reindexAll()
#13 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
#14 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(127): Mage_Index_Model_Process->reindexEverything()
#15 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#16 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch(’reindexProcess’)
#17 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 /home/users/hertwftp/hertog-hengelsport.nl/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#19 /home/users/hertwftp/hertog-hengelsport.nl/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#20 /home/users/hertwftp/hertog-hengelsport.nl/index.php(91): Mage::run(’hs’, ‘store’)
#21 {main}
我希望有人能指出我正确的解决方案,我对这个问题非常绝望。
提前致谢!
答案 0 :(得分:0)
尝试截断以log
开头的所有表TRUNCATE `log_customer`;
TRUNCATE `log_quote`;
TRUNCATE `log_summary`;
TRUNCATE `log_summary_type`;
TRUNCATE `log_url`;
TRUNCATE `log_url_info`;
TRUNCATE `log_visitor`;
TRUNCATE `log_visitor_info`;
同时清除文件夹中的所有缓存,锁定,会话并再次尝试运行网站。
您也可以查看方法_replace
https://magento.stackexchange.com/questions/260/price-re-index-causes-db-deadlocks-during-checkout
答案 1 :(得分:-1)
我通过安装一个固定索引进程Extension的扩展来解决了这个问题 我店里有17k产品,我怀疑是问题所在。
谢谢你的帮助!