Go to the first, previous, next, last section, table of contents.


MySQL server has gone away error.

The most common reason for the MySQL server has gone away error is that the server closed the connection because of a timeout. By default the server closes the connection after 8 hours if nothing has happened.

If you have a script you just have to issue the query again for the client to do a automaticly reconnection.

One normally can get these error codes in this case: (Which one you get is OS dependent)

CR_SERVER_GONE_ERROR The client couldn't send a question to the server.
CR_SERVER_LOST The client didn't get an error when writing to the server but it didn't get full answer (or any answer) to the question.
You can also get this error if you send a wrong or too big query to the server. If mysqld gets a wrong block it assumes that something has gone wrong with the client and closes the connection. If you need big queries, if you are for example working with big blobs, you can increase the query limit by starting mysqld with the option -O max_query_size=# (default 65536). The extra memory is allocated by demand, so mysqld will only use more memory when you issue a big query or when mysqld must return a big result row!


Go to the first, previous, next, last section, table of contents.