2013-12-22 115 views
1

我在嘗試更新產品時遇到了一些問題。比方說,我想添加產品到一個新的類別,當我點擊保存它只是繼續加載,沒有任何反應。無法更新Magento中的產品

問題啓動時啓用flat_catalog,當我試圖與"Reindex all"建立表,服務器無法處理SQL線程,所以我需要再次禁用flat_category

錯誤日誌我看到SQL timeout。有什麼建議可以解決問題?

這是從日誌:

exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1205 Lock wait   timeout exceeded; try restarting transaction' in  /var/www/webshop.com/public_html/lib/Zend/Db/Statement/Pdo.php:228 
Stack trace: 
#0 /var/www/webshop.com/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) 
#1 /var/www/webshop.com/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) 
#2 /var/www/webshop.com/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array) 
#3 /var/www/webshop.com/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array) 
#4 /var/www/webshop.com/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('UPDATE `catalog...', Array) 
#5 /var/www/webshop.com/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('UPDATE `catalog...', Array) 
#6 /var/www/webshop.com/public_html/lib/Zend/Db/Adapter/Abstract.php(632): Varien_Db_Adapter_Pdo_Mysql->query('UPDATE `catalog...', Array) 
#7 /var/www/webshop.com/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1357): Zend_Db_Adapter_Abstract->update('catalog_product...', Array, '`entity_id`=309...') 
#8 /var/www/webshop.com/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1123): Mage_Eav_Model_Entity_Abstract->_processSaveData(Array) 
#9 /var/www/webshop.com/public_html/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Eav_Model_Entity_Abstract->save(Object(Mage_Catalog_Model_Product)) 
#10 /var/www/webshop.com/public_html/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(728): Mage_Core_Model_Abstract->save() 
#11 /var/www/webshop.com/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->saveAction() 
#12 /var/www/webshop.com/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('save') 
#13 /var/www/webshop.com/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) 
#14 /var/www/webshop.com/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch() 
#15 /var/www/webshop.com/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array) 
#16 /var/www/webshop.com/public_html/index.php(111): Mage::run('default', 'store') 
#17 {main} 

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction' in /var/www/webshop.com/public_html/lib/Zend/Db/Statement/Pdo.php:234 
Stack trace: 
#0 /var/www/webshop.com/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) 
#1 /var/www/webshop.com/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array) 
#2 /var/www/webshop.com/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array) 
#3 /var/www/webshop.com/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('UPDATE `catalog...', Array) 
#4 /var/www/webshop.com/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('UPDATE `catalog...', Array) 
#5 /var/www/webshop.com/public_html/lib/Zend/Db/Adapter/Abstract.php(632): Varien_Db_Adapter_Pdo_Mysql->query('UPDATE `catalog...', Array) 
#6 /var/www/webshop.com/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1357): Zend_Db_Adapter_Abstract->update('catalog_product...', Array, '`entity_id`=309...') 
#7 /var/www/webshop.com/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1123): Mage_Eav_Model_Entity_Abstract->_processSaveData(Array) 
#8 /var/www/webshop.com/public_html/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Eav_Model_Entity_Abstract->save(Object(Mage_Catalog_Model_Product)) 
#9 /var/www/webshop.com/public_html/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(728): Mage_Core_Model_Abstract->save() 
#10 /var/www/webshop.com/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->saveAction() 
#11 /var/www/webshop.com/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('save') 
#12 /var/www/webshop.com/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) 
#13 /var/www/webshop.com/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch() 
#14 /var/www/webshop.com/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array) 
#15 /var/www/webshop.com/public_html/index.php(111): Mage::run('default', 'store') 
#16 {main} 

回答

0

第一明確出flat表通過起訴DELETE FROM table;然後經由殼開球索引以外的magento

Unix

Windows

如果你仍然得到錯誤,那麼它是你的sql實例中的一個設置,a請刪除設置並重新啓動服務器以進行更改,然後重新啓動。你可以改變它,因爲你只需要這樣做reindex