DBD::mysql error

Bug #1180922 reported by Jeremy Bowers
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
Medium
Alexey Kopytov
2.1
Fix Released
Medium
Alexey Kopytov

Bug Description

I upgraded from xtrabackup-2.0.7 to xtrabackup-2.1.1 yesterday. I'm using Ubuntu 12.04 LTS and percona-server5.5. Backups worked great until after the upgrade. Here's what happens:

<email address hidden>:/backups# innobackupex /backups/backup_dir/

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Ireland Ltd 2009-2012. All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

130516 16:34:30 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' (using password: NO).
130516 16:34:30 innobackupex: Connected to MySQL server
IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".

innobackupex: Using mysql server version 5.5.30-30.2-log

innobackupex: Created backup directory /backups/backup_dir/2013-05-16_16-34-30
WARNING : A left over instance of xtrabackup pid file '/tmp/xtrabackup_pid' was found.

130516 16:34:30 innobackupex: Starting ibbackup with command: xtrabackup_55 --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/backups/backup_dir/2013-05-16_16-34-30 --tmpdir=/tmp
innobackupex: Waiting for ibbackup (pid=7562) to suspend
innobackupex: Suspend file '/backups/backup_dir/2013-05-16_16-34-30/xtrabackup_suspended_2'

xtrabackup_55 version 2.1.1 for Percona Server 5.5.16 Linux (x86_64) (revision id: 600)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 52428800
xtrabackup: using O_DIRECT
>> log scanned up to (65109353)
[01] Copying ./ibdata1 to /backups/backup_dir/2013-05-16_16-34-30/ibdata1
>> log scanned up to (65109353)
[01] ...done
>> log scanned up to (65109353)

130516 16:34:33 innobackupex: Continuing after ibbackup has suspended
130516 16:34:33 innobackupex: Starting to lock all tables...
130516 16:34:33 innobackupex: All tables locked and flushed to disk

130516 16:34:33 innobackupex: Starting to backup non-InnoDB tables and files
innobackupex: in subdirectories of '/var/lib/mysql'
innobackupex: Backing up file '/var/lib/mysql/percona/db.opt'
innobackupex: Backing up file '/var/lib/mysql/percona/checksums.frm'
innobackupex: Backing up files '/var/lib/mysql/mysql/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (72 files)
>> log scanned up to (65109353)
innobackupex: Backing up file '/var/lib/mysql/change_tracking_data/web_hooks.frm'
innobackupex: Backing up file '/var/lib/mysql/change_tracking_data/fields_changed.frm'
innobackupex: Backing up file '/var/lib/mysql/change_tracking_data/js_phrases.frm'
innobackupex: Backing up file '/var/lib/mysql/change_tracking_data/db.opt'
innobackupex: Backing up file '/var/lib/mysql/change_tracking_data/js_plural_phrases.frm'
innobackupex: Backing up files '/var/lib/mysql/performance_schema/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (18 files)
>> log scanned up to (65109353)
innobackupex: Backing up files '/var/lib/mysql/company_stuff1/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (256 files)
>> log scanned up to (65109353)
>> log scanned up to (65109353)
>> log scanned up to (65109353)
innobackupex: Backing up files '/var/lib/mysql/company_stuff2/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (256 files)
>> log scanned up to (65109353)
>> log scanned up to (65109353)
>> log scanned up to (65109353)
innobackupex: Backing up files '/var/lib/mysql/company_stuff3/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (256 files)
>> log scanned up to (65109353)
>> log scanned up to (65109353)
>> log scanned up to (65109353)
innobackupex: Backing up files '/var/lib/mysql/company_stuff4/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (256 files)
>> log scanned up to (65109353)
>> log scanned up to (65109353)
>> log scanned up to (65109353)
130516 16:34:47 innobackupex: Finished backing up non-InnoDB tables and files

130516 16:34:47 innobackupex: Waiting for log copying to finish

xtrabackup: The latest check point (for incremental): '65109353'
xtrabackup: Stopping log copying thread.
.>> log scanned up to (65109353)

xtrabackup: Transaction log of lsn (65109353) to (65109353) was copied.
DBD::mysql::db do failed: Lost connection to MySQL server during query at /usr/bin/innobackupex line 1438.
innobackupex: Error:
Error executing 'UNLOCK TABLES': DBD::mysql::db do failed: Lost connection to MySQL server during query at /usr/bin/innobackupex line 1438.

The errors at the end indicate it probably relates to the change to use perl dbd::mysql instead of the mysql client directly, but I'm not sure where to go from here.

Related branches

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Jeremy,

It looks like wait_timeout on the server is set to some very small value. Can you confirm this? Thanks.

Revision history for this message
Jeremy Bowers (cubiclelord) wrote :

mysql> show variables like "wait_timeout";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| wait_timeout | 28800 |
+---------------+-------+
1 row in set (0.00 sec)

Thanx for the help Alexey

Revision history for this message
Jeremy Bowers (cubiclelord) wrote :
Download full text (3.2 KiB)

I just tried xtrabackup-2.1.2 and it looks like it does fix the error I had listed. I now have a separate, but I believe to be a related bug. If you'd prefer I can open a new ticket, but in the meantime I'll post it here:

I'm using percona-server-5.5 and Ubuntu 12.04 with xtrabackup-2.1.2. If I run xtrabackup --stream=tar ./ > backup.tar, I get the appropriate backup file, with no errors, but if I then pipe that command into gzip like the documentation says I can (and which worked fine in xtrabackup-2.0.7) the backup appears to go on forever and doesn't ever finish:

<email address hidden>:~# innobackupex --stream=tar ./ | gzip - > backup.tar.gz

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Ireland Ltd 2009-2012. All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

130521 15:22:39 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' (using password: NO).
130521 15:22:39 innobackupex: Connected to MySQL server
IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".

innobackupex: Using mysql server version 5.5.30-30.2-log

innobackupex: Created backup directory /root

130521 15:22:39 innobackupex: Starting ibbackup with command: xtrabackup_55 --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/tmp --tmpdir=/tmp --stream=tar
innobackupex: Waiting for ibbackup (pid=1855) to suspend
innobackupex: Suspend file '/tmp/xtrabackup_suspended_2'

xtrabackup_55 version 2.1.2 for Percona Server 5.5.16 Linux (x86_64) (revision id: 611)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 5242880
xtrabackup: using O_DIRECT
>> log scanned up to (1204575598)
[01] Streaming ./ibdata1
>> log scanned up to (1204576025)
>> log scanned up to (1204576025)
>> log scanned up to (1204576025)
>> log scanned up to (1204576025)
>> log scanned up to (1204576025)
>> log scanned up to (1204576025)
[01] ...done
>> log scanned up to (1204576025)

130521 15:22:47 innobackupex: Continuing after ibbackup has suspended
130521 15:22:47 innobackupex: Starting to lock all tables...
DBD::mysql::db do failed: Lost connection to MySQL server during query at /usr/bin/innobackupex line 1441.
innobackupex: Error:
Error executing 'FLUSH TABLES WITH READ LOCK': DBD::mysql::db do failed: Lost connection to MySQL server during query at /usr/bin/innobackupex line 1441.

>> log scanned up to (1204576452)
>> log scanned up to (1204576452)
>> log scanned up to (1204576452)
>> log scanned up to (1204576452)
>> log scanned up to (1204576452)
>> log scanned up to (1204576452)
>> log scanned up to (1204576452)
>> log scanned up to (1204576452)
>> log scanned up to (1204576452)
...

The log scanning, as far as I can tell just continues to g...

Read more...

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-633

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.