0

My website was running perfectly and then I started to receive this error continuously. I tried to find solution almost everywhere I could, but found nothing that could help. I even talked to the hosting company to know if there was something they could do, but they just said there might be some extension I am using which is talking too much time and I don't think that is the issue as I have not installed any extension recently (I might be wrong).

This error fixes itself but for that it needs the server to be restarted. How am I suppose to solve this error? Please help me anyone from the community.

*For your information, I moved my website to different hosting account 2 weeks before I received this error.

There has been an error processing your request

SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query, query was: UPDATE `mgqu_sales_flat_quote` SET `store_id` = ?, `created_at` = '2017-05-08 22:22:09', `updated_at` = '2017-05-08 22:39:58', `converted_at` = ?, `is_active` = ?............... WHERE (entity_id='151')


Trace:
#0 /home/loudvjtg/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/loudvjtg/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/loudvjtg/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/loudvjtg/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('UPDATE `mgqu_sa...', Array)
#4 /home/loudvjtg/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('UPDATE `mgqu_sa...', Array)
#5 /home/loudvjtg/public_html/lib/Zend/Db/Adapter/Abstract.php(635): Varien_Db_Adapter_Pdo_Mysql->query('UPDATE `mgqu_sa...', Array)
#6 /home/loudvjtg/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(433): Zend_Db_Adapter_Abstract->update('mgqu_sales_flat...', Array, 'entity_id='151'')
#7 /home/loudvjtg/public_html/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Sales_Model_Quote))
#8 /home/loudvjtg/public_html/app/code/core/Mage/Sales/Model/Quote.php(1966): Mage_Core_Model_Abstract->save()
#9 /home/loudvjtg/public_html/app/code/core/Mage/Checkout/Model/Cart.php(459): Mage_Sales_Model_Quote->save()
#10 /home/loudvjtg/public_html/app/code/core/Mage/Checkout/controllers/CartController.php(144): Mage_Checkout_Model_Cart->save()
#11 /home/loudvjtg/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_CartController->indexAction()
#12 /home/loudvjtg/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#13 /home/loudvjtg/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))
#14 /home/loudvjtg/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#15 /home/loudvjtg/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#16 /home/loudvjtg/public_html/index.php(137): Mage::run('', 'store')
#17 {main}

Error log record number: 635070368787

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /home/loudvjtg/public_html/lib/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 /home/loudvjtg/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) #1 /home/loudvjtg/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) #2 /home/loudvjtg/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array) #3 /home/loudvjtg/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #4 /home/loudvjtg/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `mgqu_co...', Array) #5 /home/loudvjtg/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `mgqu_co...', Array) #6 /home/loudvjtg/public_html/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Arr in /home/loudvjtg/public_html/lib/Zend/Db/Statement/Pdo.php on line 235
  • Connect to MySQL and run the query SHOW STATUS LIKE 'UPTIME';. This is seconds since the last restart of the mysqld server process. If the value is small, your server is encountering a condition that causes a crash, which is followed by a restart, and is one possible cause of the error. SELECT @@LOG_ERROR; to learn the path to the error log. Read this file. – Michael - sqlbot May 9 '17 at 3:12
0

General error: 2006 MySQL server has gone away is a very generic error. It can be fired due to very different reasons. Usually, it happens with slow (until timeout) or very expensive queries

Looking your code trace, it seems it is just Magento default code (no extensions involved), so I bet your database is bigger than your MySQL resources can handle, or maybe your MySQL configuration is not correctly tuned to run a Magento application

In both cases, your hosting provider should give you an answer or recommendation

  • Yes, it's just like you said slow or expensive queries, even the hosting provider said that but they could not solve the issue. How do I configure MySQL correctly? – Jwngdow Narzary May 9 '17 at 12:48
  • Check this, for example magento.stackexchange.com/questions/113166/… – Raul Sanchez May 9 '17 at 14:35
  • I do not have my.cnf file anywhere. I checked the etc folder but could not find. – Jwngdow Narzary May 10 '17 at 17:36
  • Well, normally this is hosting provider responsibility... maybe you'd search for a Magento specific hosting provider – Raul Sanchez May 10 '17 at 19:39
0

This error is basically occurring on your server as the SQL stops working after restarting. Your website is working fine. If this problem persists again and again then you should contact your hosting provider for a concrete solution for SQL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.