Error: Connection to mysql child process (pid=123) timedout

Hi,

I’m testing XtraBackup v2.0.2 with our MySQL v5.1.61 server but the backup appears to abort with the following error:

log scanned up to (8 407422566)
log scanned up to (8 407422566)
log scanned up to (8 407422566)
log scanned up to (8 407422566)
log scanned up to (8 407422566)
innobackupex: Error: Connection to mysql child process (pid=4367) timedout. (Time limit of 900 seconds exceeded. You may adjust time limit by editing the value of parameter “$mysql_response_time
out” in this script.) while waiting for reply to MySQL request: ‘FLUSH TABLES WITH READ LOCK;’ at /home/foo/percona-xtrabackup-2.0.2/bin/innobackupex line 374.

Any ideas on what could be causing this?

I’m starting the backup with the following command:

innobackupex --user=bkpuser --password=xyz /data/BACKUP/master/mysql1

This is because you have one or more tables locked for more than 15 min (900 seconds) and innobackupex wasn’t able to run the “FLUSH TABLES WITH READ LOCK”.

Solutions… you have 2:

1- increase the “900” . Line 55 of innobackupex (I think that 15 min is big enough)
2- [Recommended] check which query is the one that is holding the lock for more than 15 min and check how you can improve it. To do this, I recommend you enable the mysql slow log (if you don’t have already enabled) and then use “mysqldumpslow -t 20 -s al /var/lib/mysql/mysql-slow.log” or “pt-query-digest --group-by=Lock_time --order-by=Lock_time:max /var/lib/mysql/mysql-slow.log”

Martin.