我正在使用Magento ver。 1.9.1.0
我面临的问题是每当我从magento admin重新索引数据时,它会显示错误,如
There has been an error processing your request
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away, query was: SELECT `core_flag`.* FROM `core_flag` WHERE (`core_flag`.`flag_code`='synchronize')
Trace:
#0 /home/ankitmidha02/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/ankitmidha02/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/ankitmidha02/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/ankitmidha02/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `core_fl...', Array)
#4 /home/ankitmidha02/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `core_fl...', Array)
#5 /home/ankitmidha02/public_html/lib/Zend/Db/Adapter/Abstract.php(756): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/ankitmidha02/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(380): Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select))
#7 /home/ankitmidha02/public_html/app/code/core/Mage/Core/Model/Abstract.php(225): Mage_Core_Model_Resource_Db_Abstract->load(Object(Mage_Core_Model_File_Storage_Flag), 'synchronize', 'flag_code')
#8 /home/ankitmidha02/public_html/app/code/core/Mage/Core/Model/Flag.php(119): Mage_Core_Model_Abstract->load('synchronize', 'flag_code')
#9 /home/ankitmidha02/public_html/app/code/core/Mage/Core/Model/File/Storage.php(84): Mage_Core_Model_Flag->loadSelf()
#10 /home/ankitmidha02/public_html/app/code/core/Mage/Core/Model/Observer.php(61): Mage_Core_Model_File_Storage->getSyncFlag()
#11 /home/ankitmidha02/public_html/app/code/core/Mage/Core/Model/App.php(1338): Mage_Core_Model_Observer->addSynchronizeNotification(Object(Varien_Event_Observer))
#12 /home/ankitmidha02/public_html/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Core_Model_Observer), 'addSynchronizeN...', Object(Varien_Event_Observer))
#13 /home/ankitmidha02/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#14 /home/ankitmidha02/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(529): Mage::dispatchEvent('controller_acti...', Array)
#15 /home/ankitmidha02/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch()
#16 /home/ankitmidha02/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(407): Mage_Adminhtml_Controller_Action->preDispatch()
#17 /home/ankitmidha02/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#18 /home/ankitmidha02/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))
#19 /home/ankitmidha02/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home/ankitmidha02/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#21 /home/ankitmidha02/public_html/index.php(87): Mage::run('', 'store')
#22 {main}
由于这个原因,网站加载速度很慢。这是什么原因以及如何解决这个问题?
答案 0 :(得分:0)
我遇到了同样的问题,所以我根据服务器容量将此配置更改为。
innodb_lock_wait_timeout
key_buffer
max_allowed_packet
thread_stack
thread_cache_size
innodb_buffer_pool_size