receiving Lost connection to MySQL server during query

Since upgrading to Percona MySQL 5.5 from the default MySQL a month ago, I’m receiving the error “Lost connection to MySQL server during query” at times. I never experienced them with the default MySQL from mysql.com.

I’m seeing them in 2 places:

  1. Loading a mysqldump backup into a new database via “mysql -u root -p test < backup.sql” where I’ll receive an error on a CREATE TABLE or an INSERT:

ERROR 2013 (HY000) at line 92: Lost connection to MySQL server during query
ERROR 2006 (HY000) at line 92: MySQL server has gone away
ERROR 2006 (HY000) at line 92: MySQL server has gone away

  1. Running a SELECT statement in the mysql client where I’ll receive an error:

ERROR 2013 (HY000): Lost connection to MySQL server during query
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect…

I’m running with log_warnings=2 and in both cases, the following gets logged in the mysql error log:

120908 9:46:49 [Warning] Aborted connection 3390 to db: ‘test’ user: ‘root’ host: ‘127.0.0.1’ (Got an error reading communication packets)

I’m running CentOS 5.8 x86_64. My current tests are using the RPM’s for Percona 5.5.24-26.0, but I have run into it on 5.5.25a-27.1 too. In each case, the client is running on the server itself and is connecting to the server at 127.0.0.1 via TCP - my my.cnf has

[client]
host = 127.0.0.1
port = 3306
password

I haven’t been able to create a reproduce script because the errors are intermittent, and if I re-run the failed statements, they usually work the 2nd time. I noticed this bug which could be related - [URL=“https&#58;&#47;&#47;bugs.launchpad.net/percona-server/+bug/925343”]https://bugs.launchpad.net/percona-server/+bug/925343[/URL].

Are there other ways that I can narrow down what is causing this problem?

Thanks,
Ryan

From discussion in the above launchpad bug, the issue is related to resizing the terminal window while the query is running ([URL]MySQL Bugs: #62578: mysql client aborts connection on terminal resize). In my case, I’m running putty on Windows connecting to a CentOS machine. From my testing, I can only reproduce it using Percona 5.5.27-28.1. I cannot reproduce it with MySQL 5.5.27 from mysql.com.