- Desde
- 27 Jul 2008
- Mensajes
- 1.245
The most common reasons for the MySQL server has gone away error are:
1. Is that the server timed out and closed the connection. By default, the server closes the connection after 8 hours or 28800 seconds if nothing has happened. You can change the time limit by setting the wait_timeout variable when you start mysqld via your server's /etc/my.cnf as well.
2. Another common reason to receive the MySQL server has gone away error is because you have issued a ``close'' on your MySQL connection and then tried to run a query on the closed connection. You can check that the MySQL hasn't died by executing mysqladmin version and examining the uptime.
i.e. to check mysql uptime, in shell as root user type:
mysqladmin -u root -p version
3. You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld gets a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by starting mysqld with the -O max_allowed_packet=# option (default 1M) or via max_allowed_packet variable in your /etc/my.cnf file and restarting mysql after you edited your /etc/my.cnf file. The extra memory is allocated on demand, so mysqld will use more memory only when you issue a big query or when mysqld must return a big result row
4. Or simply your host restarted MySQL. I'd contact your web host and ask him to look into this.
Links to additional information:
Search Results: Gone_away.html
Search Results: Common_errors.html
Search Results: Server_parameters.html
Search Results: Option_files.html
Search Results: SHOW_VARIABLES.html
Me parecio bueno aderir este post de Wayne Luke
Agradeceria si alguien es tan amable de traducir. Gracias
1. Is that the server timed out and closed the connection. By default, the server closes the connection after 8 hours or 28800 seconds if nothing has happened. You can change the time limit by setting the wait_timeout variable when you start mysqld via your server's /etc/my.cnf as well.
2. Another common reason to receive the MySQL server has gone away error is because you have issued a ``close'' on your MySQL connection and then tried to run a query on the closed connection. You can check that the MySQL hasn't died by executing mysqladmin version and examining the uptime.
i.e. to check mysql uptime, in shell as root user type:
mysqladmin -u root -p version
3. You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld gets a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by starting mysqld with the -O max_allowed_packet=# option (default 1M) or via max_allowed_packet variable in your /etc/my.cnf file and restarting mysql after you edited your /etc/my.cnf file. The extra memory is allocated on demand, so mysqld will use more memory only when you issue a big query or when mysqld must return a big result row
4. Or simply your host restarted MySQL. I'd contact your web host and ask him to look into this.
Links to additional information:
Search Results: Gone_away.html
Search Results: Common_errors.html
Search Results: Server_parameters.html
Search Results: Option_files.html
Search Results: SHOW_VARIABLES.html
Me parecio bueno aderir este post de Wayne Luke
Agradeceria si alguien es tan amable de traducir. Gracias