cancel
Showing results for 
Search instead for 
Did you mean: 

SQLSTATE [HY000]: General error: 2006 MySQL server has gone away

SQLSTATE [HY000]: General error: 2006 MySQL server has gone away

Hi!

My site was down yesterday for around 600 minutes due to error. Have you encountered a similar problem. How have you resolved it. Thanks. 

a:5:{i:0;s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";i:1;s:6343:"#0 /home/rocknshop/web/rocknshop.com/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/rocknshop/web/rocknshop.com/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/rocknshop/web/rocknshop.com/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `directo...', Array)
#4 /home/rocknshop/web/rocknshop.com/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `directo...', Array)
#5 /home/rocknshop/web/rocknshop.com/public_html/lib/Zend/Db/Adapter/Abstract.php(737): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Directory/Model/Resource/Currency.php(240): Zend_Db_Adapter_Abstract->fetchAll(Object(Varien_Db_Select), Array)
#7 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Directory/Model/Resource/Currency.php(217): Mage_Directory_Model_Resource_Currency->_getRatesByCode('USD', Array)
#8 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Directory/Model/Currency.php(342): Mage_Directory_Model_Resource_Currency->getCurrencyRates('USD', Array)
#9 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Directory/Block/Currency.php(64): Mage_Directory_Model_Currency->getCurrencyRates(Object(Mage_Directory_Model_Currency), Array)
#10 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Directory/Block/Currency.php(44): Mage_Directory_Block_Currency->getCurrencies()
#11 /home/rocknshop/web/rocknshop.com/public_html/app/design/frontend/zonda/default/template/directory/currency.phtml(8): Mage_Directory_Block_Currency->getCurrencyCount()
#12 /home/rocknshop/web/rocknshop.com/public_html/app/code/local/Mage/Core/Block/Template.php(241): include('/home/rocknshop...')
#13 /home/rocknshop/web/rocknshop.com/public_html/app/code/local/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/zonda/...')
#14 /home/rocknshop/web/rocknshop.com/public_html/app/code/local/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#15 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#16 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#17 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('currency', true)
#18 /home/rocknshop/web/rocknshop.com/public_html/app/design/frontend/zonda/default/template/page/html/header.phtml(133): Mage_Core_Block_Abstract->getChildHtml('currency')
#19 /home/rocknshop/web/rocknshop.com/public_html/app/code/local/Mage/Core/Block/Template.php(241): include('/home/rocknshop...')
#20 /home/rocknshop/web/rocknshop.com/public_html/app/code/local/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/zonda/...')
#21 /home/rocknshop/web/rocknshop.com/public_html/app/code/local/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#22 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#23 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#24 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('header', true)
#25 /home/rocknshop/web/rocknshop.com/public_html/app/design/frontend/zonda/default/template/page/1column.phtml(58): Mage_Core_Block_Abstract->getChildHtml('header')
#26 /home/rocknshop/web/rocknshop.com/public_html/app/code/local/Mage/Core/Block/Template.php(241): include('/home/rocknshop...')
#27 /home/rocknshop/web/rocknshop.com/public_html/app/code/local/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/zonda/...')
#28 /home/rocknshop/web/rocknshop.com/public_html/app/code/local/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#29 /home/rocknshop/web/rocknshop.com/public_html/app/code/community/MageWorx/SeoBase/Block/Page/Html.php(16): Mage_Core_Block_Template->_toHtml()
#30 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): MageWorx_SeoBase_Block_Page_Html->_toHtml()
#31 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#32 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#33 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#34 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'no-route')
#35 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Cms/controllers/IndexController.php(75): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'no-route')
#36 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->noRouteAction()
#37 /home/rocknshop/web/rocknshop.com/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('noRoute')
#38 /home/rocknshop/web/rocknshop.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))
#39 /home/rocknshop/web/rocknshop.com/public_html/app/code/local/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#40 /home/rocknshop/web/rocknshop.com/public_html/app/Mage.php(685): Mage_Core_Model_App->run(Array)
#41 /home/rocknshop/web/rocknshop.com/public_html/index.php(122): Mage::run('international_v...', 'store')
#42 {main}";s:3:"url";s:45:"/women/bags/jean-striped-box-clutch-4230.html";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:18:"international_view";}

3 REPLIES

Re: SQLSTATE [HY000]: General error: 2006 MySQL server has gone away

Hi @neeraj _moorjani

 

The usual cause when you get MySQL server has gone away is timeout errors and max_allowed_packet being set too low.

 

Check your my.cnf file for below configuration and its value at least should be like below :

 

 

max_allowed_packet = 16M
wait_timeout = 1800 
connect_timeout = 120


Also this is reported and known issue , so you can refer this link for the same - https://magento.stackexchange.com/questions/42176/geting-fatal-error-sqlstatehy000-general-error-200...

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: SQLSTATE [HY000]: General error: 2006 MySQL server has gone away

Kindly refer below links to solve your issue,

https://magento.stackexchange.com/questions/9007/magento-mysql-has-gone-away-error#answer-9016

 

https://stackoverflow.com/questions/30544913/sqlstatehy000-general-error-2006-mysql-server-has-gone-...

 

https://www.yireo.com/tutorials/magento/magento-administration/1284-mysql-server-has-gone-away

 

Fix:

Try increasing the value of wait_timeout variable in your MySQL's my.ini file.

If Issue Solved, Click Kudos/Accept As solutions.

Re: SQLSTATE [HY000]: General error: 2006 MySQL server has gone away

Currently  the settings are hereunder. 

 

max_allowed_packet = 2GB
wait_timeout = 160000