Showing results for 
Search instead for 
Did you mean: 

How can I fix this error

How can I fix this error

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /home/shopgsx6/public_html/includes/src/__default.php:66107 Stack trace: #0 /home/shopgsx6/public_html/includes/src/__default.php(66107): PDOStatement->execute(Array) #1 /home/shopgsx6/public_html/includes/src/Varien_Db_Statement_Pdo_Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) #2 /home/shopgsx6/public_html/includes/src/__default.php(65695): Varien_Db_Statement_Pdo_Mysql->_execute(Array) #3 /home/shopgsx6/public_html/includes/src/__default.php(54884): Zend_Db_Statement->execute(Array) #4 /home/shopgsx6/public_html/includes/src/__default.php(55921): Zend_Db_Adapter_Abstract->query('SELECT `mgmi_co...', Array) #5 /home/shopgsx6/public_html/includes/src/__default.php(56859): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `mgmi_co...', Array) #6 /home/shopgsx6/public_html/includes/src/__default.php(55232): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array) #7 /home/shopgsx6/p in /home/shopgsx6/public_html/includes/src/__default.php on line 66114

Thank you

Re: How can I fix this error

We experience this issue often @iweb on Macs and the only solution we have is to restart MySQL. It seems to be an issue with PDO and bound parameters which somehow causes a crash in MySQL, but so far we've not Identified the cause. Hopefully someone else can shed some light on this? | Magento Small Business Partner

Re: How can I fix this error



Its a kind of error which happen there is issues with DB connections,  PHP script taking too long to execute or response is very large (which is probable in case of Magento)


you can make the following changes to my.cnf settings:

max_allowed_packet = 16M
wait_timeout = 1800
connect_timeout = 120
Then need to restart your MySQL server.


If the above solution doesnot work try to run your raw sql query and test if its actually working properly.