This also happens when you use compression of the mysql connection handler and due to some limitations of mysql server which cannot return easily an error message. Instead, it just kills the connection without a message. So turn off the compression and remove the 'quick' option from /etc/my.cnf if you observe lost connections to get the message.
Read the answer from Michael Widenius:
http://bugs.mysql.com/bug.php?id=1011
<quote>
[19 Aug 2003 15:41] Michael Widenius
Sorry about the last bug entry, but it was not true. Sinisa had a patch pending but I
didn't approve of it as it didn't solve this problem for all cases.
This problem is already documented in the manual section
'MySQL server has gone away Error':
-----
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.
-----
We fixed this problem in 4.0 for not compressed packets but for
compressed packets it's VERY hard to fix it without having to allocate
a buffer bigger than max_allowed_packet, which would defeat the
purpose of this flag. Ane problem is that to be able to skip the
packet we have to decompress all packets in the stream and this would
make it easy for someone to force the server to allocate a lot of big
packets even if the MySQL administrator has forbidden this.
I looked into fixing this but didn't come up with a good way to to fix
it without a major amount of work (8-16 hours).
As we have more important things on our todo (this is not a serious
bug) we have to put this on hold for now and look at fixing this in
4.1 or 5.0.
The easy way to avoid this problem is to ensure that max_allowed_packet is set bigger in
the mysqld server than in the client and that all clients uses the same value for
max_allowed_packet.
Regards,
Monty
</quote>
Bookmarks