Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 无法在Magento中更新产品_Php_Sql_Magento_Zend Framework - Fatal编程技术网

Php 无法在Magento中更新产品

Php 无法在Magento中更新产品,php,sql,magento,zend-framework,Php,Sql,Magento,Zend Framework,我在尝试更新产品时遇到了一些问题。假设我想将产品添加到一个新类别中,当我单击“保存”时,它只会继续加载,什么也不会发生 当我启用flat\u catalog时出现问题,当我尝试使用的“Reindex all”构建表时,服务器无法处理sql线程,因此我需要再次禁用flat\u catalog 在错误日志中我看到SQL超时。对可能出现的问题有什么建议吗 这是来自日志: exception 'PDOException' with message 'SQLSTATE[HY000]: General

我在尝试更新产品时遇到了一些问题。假设我想将产品添加到一个新类别中,当我单击“保存”时,它只会继续加载,什么也不会发生

当我启用
flat\u catalog
时出现问题,当我尝试使用
的“Reindex all”
构建表时,服务器无法处理sql线程,因此我需要再次禁用
flat\u catalog

错误日志中我看到
SQL超时
。对可能出现的问题有什么建议吗

这是来自日志:

   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}

首先通过起诉
DELETE FROM table清除
flat
表格然后通过shell启动magento外部的索引

如果您仍然收到错误,那么这是sql实例中的一个设置,请更改该设置并重新启动服务器以进行更改,然后重新启动。您可以在之后更改它,因为您只需要重新编制索引