Bug #49641 mysqldump: Error 2013: Lost connection to MySQL server during query when dumping
Submitted: 12 Dec 2009 20:59 Modified: 13 Dec 2009 9:10
Reporter: Tomas Dalebjörk Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Backup Severity:S2 (Serious)
Version:5.0.45-7.el5 OS:Linux (RHEL 5.3)
Assigned to: CPU Architecture:Any
Tags: ERROR 2013, mysqldump

[12 Dec 2009 20:59] Tomas Dalebjörk
Description:
We get the following error:

mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `tsm_test_db` at row: 1609975

We are running several "mysqldump" commands in parallel to speedup.
But we have the opertunity to do this in sequence too.

Please help me...

How to repeat:
mysqldump --user=root --password=XXX --opt --single-transaction --routines --flush-logs  tsm_test_db
[12 Dec 2009 21:53] MySQL Verification Team
Thank you for the bug report. Duplicate of bug: http://bugs.mysql.com/bug.php?id=46103.
[13 Dec 2009 9:09] Tomas Dalebjörk
Thanks for the update.
If I run the "mysqldump" command in sequential (and not in parallel; the backup was working).

Sequential means: One database at a time from the same MySQL server.
Parallel means: Many databases at the same time from the same MySQL server.

Question: Could the parameter: --max_allowed_packet solved this problem?

Regards Tomas
[13 Dec 2009 9:10] Tomas Dalebjörk
Updated the Versions in the bug report
[6 Jul 2011 15:12] Rick James
I agree that mysqldump should do a better job of avoiding timeouts.

mysqldump is very intense on disk reads and network traffic.  I suspect that your 'parallel' dumps could each be running slow because of bottlenecking on one of these.

A workaround (for Tomas) would be to limit how many dumps are running simultaneously -- limit to where the disk and/or network is nearly saturated.