PDA

View Full Version : MySQL server gone away error explained



eva2000
Sun 7th Apr '02, 10:42am
http://dev.mysql.com/doc/refman/5.1/en/gone-away.html
http://dev.mysql.com/doc/refman/5.1/en/common-errors.html
http://dev.mysql.com/doc/refman/5.1/en/server-parameters.html
http://dev.mysql.com/doc/refman/5.1/en/option-files.html
http://dev.mysql.com/doc/refman/5.1/en/show-variables.html
[Updated 04/14/09.]

The most common reason for the MySQL server has gone away error

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 (http://www.mysql.com/doc/S/H/SHOW_VARIABLES.html) variable when you start mysqld via your server's /etc/my.cnf (http://www.mysql.com/doc/O/p/Option_files.html) 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 (http://max_allowed_packet) variable in your /etc/my.cnf (http://www.mysql.com/doc/O/p/Option_files.html) file and restarting mysql after you edited your /etc/my.cnf (http://www.mysql.com/doc/O/p/Option_files.html) 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

Andy Huang
Tue 14th Apr '09, 10:16pm
The above links no longer works, so here are the updated versions:
http://dev.mysql.com/doc/refman/5.1/en/gone-away.html
http://dev.mysql.com/doc/refman/5.1/en/common-errors.html
http://dev.mysql.com/doc/refman/5.1/en/server-parameters.html
http://dev.mysql.com/doc/refman/5.1/en/option-files.html
http://dev.mysql.com/doc/refman/5.1/en/show-variables.html

Oryx
Tue 21st Jul '09, 11:22am
I am no techie and need some help please. I get the above error and also an automated email "from the database" with the following details:

Database error in vBulletin 3.7.0:

Invalid SQL:

SELECT * FROM rsslog
WHERE uniquehash IN ('3d685217cdde0f8a49a2405734595106', 'a47120d65f1014e8362f8247dc57a373', '55c908828cf218d57769d3c6d6029376', 'bb503c94f30c505bfb3eab42bedaa030', '41b378cea1cde942fd7a6e8dea2950e1', 'def40a230c4d59f76217fd769a0f535d', '2598a5858a7c365feeaa305f6f808c9c', '5b2f28951aed77e9c672446521364dd4', '6205582e9e350bd5162d9b5b774c21d9', '715fce7c9df7a853ae0d85d74b9d516a', '92915a12ac67c096779117f24233b597', 'ac1c029b2850c1f83fc9cea71be2c3bf', 'dbd1a28d79a76c3981c2922b6483af3d', '918d10e9ec7f35e7ef411cbe3af31a67', '1b7bef425a90f99e6674ba5037d2d8f9', '1bde15edf84bd30fe9ef5f828f11e5e3', 'a0e109e28249728e322942b8a8f872c3', '125c0ee25901da2bba8aafc79ae6e4a4', '43102bbd5a9d2c852d133bb9f8595781', '05dd99ed23a3846c3a5510cdd86f857e', 'c9e57ce6335dd6650919095f288aa2ca', '06d8062da70fca333fceab289a7c6a4e', '61d1b1333a59758e249dfd2d9dd1a768', 'dd2ed0c20eafd9eafdb88e5a784c4e8a', '2660e67e6c15e89e6ae222ed492a1eea', 'fe97390a3c803c94a068f1a00cb7f47f', 'f11a6cd4b8250009c1f4d9de57760070', '9072e6cda931ad3fb5c3af25f14b73b3', 'd830b66fe2235e5101998c2166579429', '49e6d8ab89bfa5cc611d5d63d385e75e', 'af2adc95ef84cc43b4d7187b492e12a5', '7d184db90298e3ebc67b8911dfd9bb79', '261b69573c3bc8bd82a425506a622f3c', '698f0dd92121b570c427afadace9bd34', '2c02fdf55b94cd4c72f545ce82a1314c', '5afd64b6a042a6c8ac069d53cdf1f578', 'fca7c1fe2d0cbf9845cf2c7f740dc939', '607ffb1df8df47330b93ad7c1bf19918', '4ccf85a4eb59a7dcfd65d1352f94b15a', '8ae855d28887cb1c348576d1975307d1', '1e8fb8aeecbf52da8a56bec02a83a874', '445626ec764af58af86e057315d7956d', 'aa23ae0cafb601db64094ac374c1ee31', '6dc7829f47ab9241d078e5446276fffd', 'afc0cf166ab5c3a10c52f9dfe1bdc13f', '0f61ba32b82406bcb3fc4c1b3fa3ba0a', 'f53e01ee28fb3b3c52edb98353a78cc4', '96b1f309c8285ac75ce9ee62a4471b15');

MySQL Error : MySQL server has gone away
Error Number : 2006
Request Date : Tuesday, July 21st 2009 @ 02:43:28 PM
Error Date : Tuesday, July 21st 2009 @ 02:45:15 PM
Script : http://www.winebyme.co.za/sawineforum/admincp/cronadmin.php?do=runcron&varname=rssposter
Referrer : http://www.winebyme.co.za/sawineforum/admincp/rssposter.php
IP Address : 41.6.204.202
Username : Neel
Classname : vB_Database
MySQL Version :

I have a couple of rss feeds into my forum. It used to work. Then I started getting the above problem whenever the rss robot runs its update.

I have tried manual updates. Diableing all fe3eds but one. And still get the same error.

And this is the reply I get from my service provider:

"we have not gone too far into it but it seems like the scripting
generates too many queries when the rss database is called unfortunately
we cant go further into this as it is beyond the scope of the support desk."

Any help to resolve this issue will be greatly appreciated.
Thanks

Steve Machol
Tue 21st Jul '09, 3:06pm
Your server is timing out when it tries to access those feeds. This needs to be resolved on the server level. You should contact your host.

Oryx
Wed 22nd Jul '09, 4:45am
Thanks Steve

I have communicated that to them and am now waiting for their answer.