MySQL 2006 - Управление индексами Magento
У нас есть веб-сайт 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_event.event_id=main_table.event_id WHERE (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. Последняя итерация:
max_allowed_packet = 8G
connect_timeout = 120
Я попытался обновить MySQL, перезапустить сервер, перезапустить MySQL. Мысли?
2 ответа
У нас тоже была точная проблема во время индексации. После изменения значений, как показано ниже,
max_allowed_packet=4000M
wait_timeout=6000
table_open_cache=250
innodb-log-file-size = 2047M
innodb-log-buffer-size = 32M
в my.cnf мы смогли решить эту проблему.
Рекомендации:
Пожалуйста, добавьте настройки, указанные ниже, в файл my.cnf вашего сервера. sql_mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES
auto_increment_increment = 3
table_open_cache = 250
wait_timeout = 7200
восстановить соединение = 1
max_allowed_packet = 4000M
innodb_file_per_table = off
innodb-log-file-size = 2047M
innodb-log-buffer-size = 32M