MySQL has gone away / Lost connection to server during query: Difference between revisions From Online Manual

Jump to: navigation, search
(Created page with "''MySQL has gone away'' and ''Lost connection to server during query'' errors are commonly caused by the database server timing out or closing its connection before the page has ...")
 
mNo edit summary
 
Line 1: Line 1:
''MySQL has gone away'' and ''Lost connection to server during query'' errors are commonly caused by the database server timing out or closing its connection before the page has fully loaded. This error can also be caused by certain queries on MySQL versions from before 5.0.21.
''MySQL has gone away'' and ''Lost connection to server during query'' errors are commonly caused by the database server timing out or closing its connection before the page has fully loaded. This error can also be caused by certain queries on MySQL versions prior to 5.0.21.


To resolve the problem you may need to increase the values of the MySQL ''wait_timeout'' and ''connect_timeout'' settings. These values are displayed in seconds, and are usually set to 28800 by default. They can be changed in your mysql.ini or my.cnf file (depending on the server's operating system). Once changed, you should restart MySQL.
To resolve the problem you may need to increase the values of the MySQL ''wait_timeout'' and ''connect_timeout'' settings. These values are displayed in seconds, and are usually set to 28800 by default. They can be changed in your mysql.ini or my.cnf file (depending on the server's operating system). Once changed, you should restart MySQL.

Latest revision as of 18:55, 30 November 2015

MySQL has gone away and Lost connection to server during query errors are commonly caused by the database server timing out or closing its connection before the page has fully loaded. This error can also be caused by certain queries on MySQL versions prior to 5.0.21.

To resolve the problem you may need to increase the values of the MySQL wait_timeout and connect_timeout settings. These values are displayed in seconds, and are usually set to 28800 by default. They can be changed in your mysql.ini or my.cnf file (depending on the server's operating system). Once changed, you should restart MySQL.

Those using shared hosting services may not be able to change these settings themselves, and should contact their hosts to do it for them.

For more information please see the MySQL Documentation for this error.



Advertisement: