MySQL-5.5.10 – Lost connection to MySQL server during query (Both Web Clients and MySQL Slaves)

MySQLslavetimeout

We've just upgraded our existing MySQL5.1 DB servers to newer (much better) hardware with MySQL 5.5, and things have been going mostly smoothly for almost 6 weeks.

Just the last few days, I've noticed a few errors, such as:

From a MySQL Slave:

[ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)

Or From Apache/Other:

Lost connection to MySQL server at 'reading initial communication packet', system error: 110

At one point this evening, many webnodes reported this error for a three minute period (many such reports as this was in a busy period). However, the issues don't appear to correspond with any times of extreme load. For all intents and purposes, the connection/thread load on MySQL is at a normal rate (between about 10 and 40 connected threads), and Web load has been a LOT higher at times over the last few weeks.

Could there bee other reasons for these connection errors, that I'm not seeing?

Best Answer

Hooray, tuning the max_allowed_packet variable, increasing its value and restart MySQL. It will provide major capacity for MySQL in reading packets. Try it out and give us a feedback.