Xtrabackup fails on MySQL 5.7.32

Database size is approx. 3.5 GB.

Backup runs for 7-8 hrs and fails at the end with mysql gone away error.

I have two database servers with Master Master replication.
On Master 1 Backup fails & Master 2 gets completed.
Master 2 is mostly in idle state low no query and connections.


default-file:/etc/my.cnf --user=‘root’ --password=‘pwd’ --backup --parallel=8 --compress --compress-thread=4 --slave-info --safe-slave-backup --no-timestamp --target-dir=/backup/Fullbackup --rsync


starting prep copy of non-lnnoDB tables and files:
Starting rsync as: rsync -t . --files-fromz/tmp/xtrabackup,rsyncfiles_passl /backup/Fullbackup/
rsync finished successfully
Finished prep copy of non-lnnoDB tables and files
Error: failed to execute query 'SEt SESSION lock_wait_timeout=: 2006 (HY000)IMVSQL server gone away


Xtrabackup spent more idle time than your database wait_timeout configuration, which means that MySQL closed xtrabackup connection.

I would say you should adjust your MySQL wait_timeout configuration to a time that accounts for the whole duration of your backup.

1 Like