# Xtrabackup fails on MySQL 5.7.32

**URL:** <https://forums.percona.com/t/xtrabackup-fails-on-mysql-5-7-32/11988>\
**Category:** Percona XtraBackup\
**Created:** [August 31, 2021, 8:42pm UTC](https://forums.percona.com/t/xtrabackup-fails-on-mysql-5-7-32/11988 "2021-08-31T20:42:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gagandeep\_Singh\_Jhas](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/gagandeep_singh_jhas/32/4377_2.png) [@Gagandeep\_Singh\_Jhas](https://forums.percona.com/u/Gagandeep_Singh_Jhas)\
**Post date:** [August 31, 2021, 8:42pm UTC](https://forums.percona.com/t/xtrabackup-fails-on-mysql-5-7-32/11988/1 "2021-08-31T20:42:21Z")

</div>

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.

Script:

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

Error:

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

---

<div class="post-metadata">

**Author:** ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)\
**Post date:** [September 1, 2021, 11:41am UTC](https://forums.percona.com/t/xtrabackup-fails-on-mysql-5-7-32/11988/2 "2021-09-01T11:41:36Z")

</div>

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.
