Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
General error: 2006 MySQL server has gone away
 
BryGuy
Jr. Member
 
Total Posts:  29
Joined:  2008-01-30
 

Has anyone run into this error:
General error: 2006 MySQL server has gone away

It seems to happen at random.  We will be clicking along on the front or backend and then the error occurs.  We cannot reproduce it.  The time between page views is a matter of just a few seconds.

Thoughts?

 
Magento Community Magento Community
Magento Community
Magento Community
 
d9000
Jr. Member
 
Total Posts:  18
Joined:  2008-04-29
 

I’m getting the same error, but only on the “Search Terms” page.  Every time I go to the page, I get one of the following messages:

SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query

or

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

Anyone else?

 
Magento Community Magento Community
Magento Community
Magento Community
 
d9000
Jr. Member
 
Total Posts:  18
Joined:  2008-04-29
 

I upgraded the server to PHP 5.2.5 to fix an error with the search box (specific to PHP 5.2.1, I believe), and that seemed to have fixed the Search Terms error.

The page came back with a legitimate message - not an error - stating that no search terms exist.  They were not being recorded until the search bug was fixed; now the tags are showing up correctly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
norbolig
Guru
 
Total Posts:  328
Joined:  2008-03-15
 

I got this error message in the MagentoConnect Manager upon upgrading from 1.2.0.2 to 1.2.0.3:

Exception during cache and session cleaning: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

I have not been able to see any changes for the end user in the web shop. Still it would be good to know the reason for this message.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Cristian Balan
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2008-02-11
Birmingham, UK
 
norbolig - 24 January 2009 07:13 PM

I got this error message in the MagentoConnect Manager upon upgrading from 1.2.0.2 to 1.2.0.3:

Exception during cache and session cleaning: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

I have not been able to see any changes for the end user in the web shop. Still it would be good to know the reason for this message.

Same message but after installa a template.

 
Magento Community Magento Community
Magento Community
Magento Community
 
norbolig
Guru
 
Total Posts:  328
Joined:  2008-03-15
 

I did once again get “Excception during cache and session cleaning. SQLSTATE[HY000]: General error: 2006 MySQL server has gone away” error during upgrade from 1.2.0.3 to 1.2.1 Stable.

Further, after upgrade to 1.2.1, my frontend and backend still shows ver. 1.2.0.3.

 
Magento Community Magento Community
Magento Community
Magento Community
 
DaymoH
Sr. Member
 
Total Posts:  106
Joined:  2008-09-18
 
norbolig - 04 February 2009 06:38 AM

I did once again get “Excception during cache and session cleaning. SQLSTATE[HY000]: General error: 2006 MySQL server has gone away” error during upgrade from 1.2.0.3 to 1.2.1 Stable.

Further, after upgrade to 1.2.1, my frontend and backend still shows ver. 1.2.0.3.

Same here any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
baldisexy
Jr. Member
 
Total Posts:  1
Joined:  2009-02-19
 

Just installed a fresh installation of 1.2.1 Everything worked fine.
Installed the Blue template and now the backend broke like everyone elses.  Dashboard is the only menu item I can click on.
I’ve seen one other user in the forum with this same symptom.  Any others?
What did this change????
Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Robert Perfect
Jr. Member
 
Total Posts:  1
Joined:  2009-02-28
Europe
 

General error: 2006 MySQL server has gone away

This has nothing to do with Magento or PHP. It’s a MySql error generated because of the poor configuration of the MySql server.
I run in a similar problem with a client when executing bulk inserts MySql was generating “General error: 2006 MySQL server has gone away” because the packet to large exception.

In my case the solution was to ask the hosting provider to change in the MySql configuration files on the server /etc/my.cnf max_allowed_packet = 1M to 16M or more.
So I recommend you to optimize MySql configuration for Magento.
Another suggestion is try to upgrade MySql to the latest version because some things its handled differently in latest versions.

Robert

 
Magento Community Magento Community
Magento Community
Magento Community
 
techplease
Jr. Member
 
Total Posts:  2
Joined:  2008-11-07
 

After backing up Database I tried adding a product and received:

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

Site has been up for several months without problems.  First database backup was done today and I got that error.

I went into Cache Management
Choose “refresh” from the drop down and clicked saved.

I can now add products, and error went away.

I am using
Godaddy
magento v 1.1.7

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hucks
Sr. Member
 
Total Posts:  150
Joined:  2009-02-28
 

stupid has to refresh manually when its something we always has to do after using connnect manager,
so suggestion to magento team make it so it autorefreshes cashe when we go back to admin.

best regards hucks Denmark

 
Magento Community Magento Community
Magento Community
Magento Community
 
godiva
Member
 
Total Posts:  36
Joined:  2010-06-25
 

Still the sames problem. I am working on the localhost and nothing seems to be working. HELPPPPPP

2011-02-14T20:18:36+00:00 DEBUG (7): Exception message: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
Trace: #0 C:\\xampp\\htdocs\\magento\\lib\\Zend\\Db\\Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 C:\\xampp\\htdocs\\magento\\lib\\Zend\\Db\\Adapter\\Abstract.php(468): Zend_Db_Statement->execute(Array)
#2 C:\\xampp\\htdocs\\magento\\lib\\Zend\\Db\\Adapter\\Pdo\\Abstract.php(238): Zend_Db_Adapter_Abstract->query(\’INSERT INTO `ca...\’, Array)
#3 C:\\xampp\\htdocs\\magento\\lib\\Varien\\Db\\Adapter\\Pdo\\Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query(\’INSERT INTO `ca...\’, Array)
#4 C:\\xampp\\htdocs\\magento\\lib\\Varien\\Db\\Adapter\\Pdo\\Mysql.php(1452): Varien_Db_Adapter_Pdo_Mysql->query(\’INSERT INTO `ca...\’, Array)
#5 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\CatalogSearch\\Model\\Mysql4\\Fulltext\\Engine.php(86): Varien_Db_Adapter_Pdo_Mysql->insertOnDuplicate(\’catalogsearch_f...\’, Array, Array)
#6 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\CatalogSearch\\Model\\Mysql4\\Fulltext.php(635): Mage_CatalogSearch_Model_Mysql4_Fulltext_Engine->saveEntityIndexes(\’1\’, Array)
#7 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\CatalogSearch\\Model\\Mysql4\\Fulltext.php(178): Mage_CatalogSearch_Model_Mysql4_Fulltext->_saveProductIndexes(\’1\’, Array)
#8 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\CatalogSearch\\Model\\Mysql4\\Fulltext.php(90): Mage_CatalogSearch_Model_Mysql4_Fulltext->_rebuildStoreIndex(\’1\’, NULL)
#9 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\CatalogSearch\\Model\\Fulltext.php(61): Mage_CatalogSearch_Model_Mysql4_Fulltext->rebuildIndex(NULL, NULL)
#10 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\CatalogSearch\\Model\\Indexer\\Fulltext.php(315): Mage_CatalogSearch_Model_Fulltext->rebuildIndex()
#11 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\Index\\Model\\Process.php(139): Mage_CatalogSearch_Model_Indexer_Fulltext->reindexAll()
#12 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\Index\\Model\\Process.php(167): Mage_Index_Model_Process->reindexAll()
#13 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\Index\\controllers\\Adminhtml\\ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#14 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\Core\\Controller\\Varien\\Action.php(418): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#15 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\Core\\Controller\\Varien\\Router\\Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch(\’reindexProcess\’)
#16 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\Core\\Controller\\Varien\\Front.php(177): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#17 C:\\xampp\\htdocs\\magento\\app\\code\\core\\Mage\\Core\\Model\\App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#18 C:\\xampp\\htdocs\\magento\\app\\Mage.php(596): Mage_Core_Model_App->run(Array)
#19 C:\\xampp\\htdocs\\magento\\index.php(80): Mage::run(\’\’, \’store\’)

 
Magento Community Magento Community
Magento Community
Magento Community
 
hxd
Sr. Member
 
Avatar
Total Posts:  224
Joined:  2011-02-03
 
godiva - 16 February 2011 04:02 AM

Still the sames problem. I am working on the localhost and nothing seems to be working. HELPPPPPP

2011-02-14T20:18:36+00:00 DEBUG (7): Exception message: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Try increasing the value for wait_timeout in the MySQL configuration file - my.cnf.

 
Magento Community Magento Community
Magento Community
Magento Community
 
godiva
Member
 
Total Posts:  36
Joined:  2010-06-25
 

I can’t seem to find my.cnf I have however found my.ini. Is this the same? If not where exactly do I find the my.cnf file?
This is the info I have. I changed the innodb_lock_wait_timeout to 150, but I still got the same error message.

#skip-innodb
innodb_data_home_dir = “C:/xampp/mysql/data/”
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = “C:/xampp/mysql/data/”
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
WebhostUK LTD
Sr. Member
 
Avatar
Total Posts:  163
Joined:  2009-08-27
UK
 

this seems to be the correct file .. Have you tried editing the wait time in this file?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ebuntu
Sr. Member
 
Avatar
Total Posts:  245
Joined:  2010-06-16
Denver, CO
 

Detailed information about this problem: servertune.com/kbase/entry/366/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2