我们有一个magento网站,工作如预期。我们正处于优化阶段,正在尝试运行缓存。我们导航到索引管理器并收到以下信息:
sqlstate[hy000]:一般错误:2006 mysql服务器已离开,查询为:select main_table
.*, process_event
. status
作为 process_event_status
从 index_event
作为 main_table
内部连接 index_process_event
作为 process_event
on process\u event.event\u id=main\u table.event\u id其中( process_event
. process_id
='5')和( process_event
. status
='新')
# 0 /var/www/html/blue/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
# 1 /var/www/html/blue/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
# 2 /var/www/html/blue/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
# 3 /var/www/html/blue/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array)
# 4 /var/www/html/blue/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
# 5 /var/www/html/blue/lib/Zend/Db/Adapter/Abstract.php(737): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `main_ta...', Array)
# 6 /var/www/html/blue/lib/Varien/Data/Collection/Db.php(740): Zend_Db_Adapter_Abstract->fetchAll('SELECT `main_ta...', Array)
# 7 /var/www/html/blue/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(521): Varien_Data_Collection_Db->_fetchAll('SELECT `main_ta...', Array)
# 8 /var/www/html/blue/lib/Varien/Data/Collection/Db.php(572): Mage_Core_Model_Resource_Db_Collection_Abstract->getData()
# 9 /var/www/html/blue/lib/Varien/Data/Collection.php(752): Varien_Data_Collection_Db->load()
# 10 /var/www/html/blue/app/code/core/Mage/Index/Block/Adminhtml/Process/Grid.php(84): Varien_Data_Collection->count()
# 11 /var/www/html/blue/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(551): Mage_Index_Block_Adminhtml_Process_Grid->_afterLoadCollection()
# 12 /var/www/html/blue/app/code/core/Mage/Index/Block/Adminhtml/Process/Grid.php(64): Mage_Adminhtml_Block_Widget_Grid->_prepareCollection()
# 13 /var/www/html/blue/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(643): Mage_Index_Block_Adminhtml_Process_Grid->_prepareCollection()
# 14 /var/www/html/blue/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(649): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()
# 15 /var/www/html/blue/app/code/core/Mage/Core/Block/Abstract.php(922): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()
# 16 /var/www/html/blue/app/code/core/Mage/Core/Block/Abstract.php(641): Mage_Core_Block_Abstract->toHtml()
# 17 /var/www/html/blue/app/code/core/Mage/Core/Block/Abstract.php(585): Mage_Core_Block_Abstract->_getChildHtml('grid', true)
# 18 /var/www/html/blue/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php(77): Mage_Core_Block_Abstract->getChildHtml('grid')
# 19 /var/www/html/blue/app/design/adminhtml/default/default/template/widget/grid/container.phtml(36): Mage_Adminhtml_Block_Widget_Grid_Container->getGridHtml()
# 20 /var/www/html/blue/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/html/b...')
# 21 /var/www/html/blue/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
# 22 /var/www/html/blue/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
# 23 /var/www/html/blue/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
# 24 /var/www/html/blue/app/code/core/Mage/Adminhtml/Block/Widget/Container.php(308): Mage_Adminhtml_Block_Template->_toHtml()
# 25 /var/www/html/blue/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Adminhtml_Block_Widget_Container->_toHtml()
# 26 /var/www/html/blue/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
# 27 /var/www/html/blue/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Core_Block_Text_List->_toHtml()
# 28 /var/www/html/blue/app/code/core/Mage/Core/Block/Abstract.php(641): Mage_Core_Block_Abstract->toHtml()
# 29 /var/www/html/blue/app/code/core/Mage/Core/Block/Abstract.php(585): Mage_Core_Block_Abstract->_getChildHtml('content', true)
# 30 /var/www/html/blue/app/design/adminhtml/default/default/template/page.phtml(74): Mage_Core_Block_Abstract->getChildHtml('content')
# 31 /var/www/html/blue/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/html/b...')
# 32 /var/www/html/blue/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
# 33 /var/www/html/blue/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
# 34 /var/www/html/blue/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
# 35 /var/www/html/blue/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Adminhtml_Block_Template->_toHtml()
# 36 /var/www/html/blue/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
# 37 /var/www/html/blue/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
# 38 /var/www/html/blue/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(55): Mage_Core_Controller_Varien_Action->renderLayout()
# 39 /var/www/html/blue/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController->listAction()
# 40 /var/www/html/blue/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('list')
# 41 /var/www/html/blue/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
# 42 /var/www/html/blue/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
# 43 /var/www/html/blue/app/Mage.php(683): Mage_Core_Model_App->run(Array)
# 44 /var/www/html/blue/index.php(84): Mage::run('', 'store')
# 45 {main}
为了解决这个问题,我们尝试篡改my.cnf设置。最新迭代:
最大允许包数=8g
连接超时=120
我试过更新mysql,重启服务器,重启mysql。思想?
2条答案
按热度按时间eaf3rand1#
请在服务器的my.cnf文件中添加以下设置。sql模式=无引擎替换,严格的事务表
自动增量=3
表\u open \u cache=250
等待\u超时=7200
重新连接=1
最大允许包数=4000m
innodb\u file\u per\u table=关闭
innodb日志文件大小=2047m
innodb日志缓冲区大小=32m
b4lqfgs42#
我们在索引过程中也遇到了确切的问题。按以下方式更改值后,
在my.cnf中,我们能够解决这个问题。
参考文献:
http://www.magentoformat.com/magento-2-mysql-server-has-gone-away-fix/
https://magento.stackexchange.com/questions/93835/magento-2-migration-tool-mysql-server-has-gone-away