Incremental backup on slave failed

I found error when created incremental backup on slave

[ERROR] [MY-011825] [Xtrabackup] failed to execute query ‘SET SESSION lock_wait_timeout=31536000’ : 2013 (HY000) Lost connection to MySQL server during query

mysql> show global variables like ‘%timeout%’;
±----------------------------------±---------+
| Variable_name | Value |
±----------------------------------±---------+
| connect_timeout | 10 |
| delayed_insert_timeout | 300 |
| have_statement_timeout | YES |
| innodb_flush_log_at_timeout | 1 |
| innodb_lock_wait_timeout | 50 |
| innodb_rollback_on_timeout | OFF |
| interactive_timeout | 28800 |
| lock_wait_timeout | 31536000 |
| mysqlx_connect_timeout | 30 |
| mysqlx_idle_worker_thread_timeout | 60 |
| mysqlx_interactive_timeout | 28800 |
| mysqlx_port_open_timeout | 0 |
| mysqlx_read_timeout | 30 |
| mysqlx_wait_timeout | 28800 |
| mysqlx_write_timeout | 60 |
| net_read_timeout | 30 |
| net_write_timeout | 60 |
| replica_net_timeout | 60 |
| rpl_stop_replica_timeout | 31536000 |
| rpl_stop_slave_timeout | 31536000 |
| slave_net_timeout | 60 |
| ssl_session_cache_timeout | 300 |
| wait_timeout | 28800 |
±----------------------------------±---------+

mysql> show processlist
→ ;
±—±----------------±----------------±-----±--------±-----±---------------------------------------------------------±-----------------+
| Id | User | Host | db | Command | Time | State | Info |
±—±----------------±----------------±-----±--------±-----±---------------------------------------------------------±-----------------+
| 5 | event_scheduler | localhost | NULL | Daemon | 309 | Waiting on empty queue | NULL |
| 6 | system user | connecting host | NULL | Connect | 309 | Waiting for source to send event | NULL |
| 7 | system user | | NULL | Query | 309 | Replica has read all relay log; waiting for more updates | NULL |
| 10 | system user | | NULL | Connect | 309 | Waiting for an event from Coordinator | NULL |
| 11 | system user | | NULL | Connect | 309 | Waiting for an event from Coordinator | NULL |
| 12 | system user | | NULL | Connect | 309 | Waiting for an event from Coordinator | NULL |
| 13 | system user | | NULL | Connect | 309 | Waiting for an event from Coordinator | NULL |
| 14 | root | localhost | NULL | Query | 0 | init | show processlist |
±—±----------------±----------------±-----±--------±-----±---------------------------------------------------------±-----------------+

Is there any way to fix this?
No error when create full backup on slave, no error when create full and incremental backup on master

Hello @sukit,
I don’t understand your issue. Can you please give all commands used and all output? It looks like everything is fine with replication.

I run this command “xtrabackup --user=bkpuser --password --backup --slave-info --target-dir=/var/mysql_backup/full” for full backup and “xtrabackup --user=bkpuser --password --backup --slave-info --target-dir=/var/mysql_backup/incr --incremental-basedir=/var/mysql_backup/full” for incremental backup
output in attach file
output_full.txt (51.5 KB)
output_incr.txt (5.4 KB)