pt-query-digest does not reconnect to MySQL when connection is lost

Bug #1018258 reported by Jervin R
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Triaged
Undecided
Unassigned

Bug Description

When running with large slow log files and the server timedout or got disconnected somewhere along the way i.e. restarted, ptqd does not attempt to reconnect. For the purpose of testing I run ptqd on one session and killed mysql on the other.

<session #1>
[revin@forge msb_5_5_25]$ pt-query-digest --version
pt-query-digest 2.1.2
[revin@forge msb_5_5_25]$ pt-query-digest --review h=localhost,S=/tmp/mysql_sandbox5525.sock,u=msandbox,p=msandbox,D=percona,t=ptqd_r --create-review-table --review-history h=localhost,S=/tmp/mysql_sandbox5525.sock,u=msandbox,p=msandbox,D=percona,t=ptqd_rh --create-review-history-table --no-report --progress time,1 /wok/dta/wdb01-slow-log/Wdb01-slow.log.2012-04-19
/wok/dta/wdb01-slow-log/Wdb01-slow.log.2012-04-19: 0% 17:25 remain
...
...
/wok/dta/wdb01-slow-log/Wdb01-slow.log.2012-04-19: 85% 00:03 remain
/wok/dta/wdb01-slow-log/Wdb01-slow.log.2012-04-19: 90% 00:02 remain
/wok/dta/wdb01-slow-log/Wdb01-slow.log.2012-04-19: 95% 00:00 remain
Pipeline process 5 (iteration) caused an error: DBD::mysql::st execute failed: MySQL server has gone away [for Statement "SELECT `first_seen`, `last_seen`, `reviewed_by`, `reviewed_on`, `comments`, CONV(checksum, 10, 16) AS checksum_conv FROM `percona`.`ptqd_r` WHERE checksum=CONV(?, 16, 10)" with ParamValues: 0='0EE57D0F76A951F2'] at /home/revin/bin/pt-query-digest line 8571.
Will retry pipeline process 4 (iteration) 2 more times.
Pipeline process 5 (iteration) caused an error: DBD::mysql::st execute failed: MySQL server has gone away [for Statement "SELECT `first_seen`, `last_seen`, `reviewed_by`, `reviewed_on`, `comments`, CONV(checksum, 10, 16) AS checksum_conv FROM `percona`.`ptqd_r` WHERE checksum=CONV(?, 16, 10)" with ParamValues: 0='0EE57D0F76A951F2'] at /home/revin/bin/pt-query-digest line 8571.
Will retry pipeline process 4 (iteration) 1 more time.
Pipeline process 2 (input) caused an error: tell() on closed filehandle at /home/revin/bin/pt-query-digest line 12167.
The pipeline caused an error: Pipeline process 5 (iteration) caused an error: DBD::mysql::st execute failed: MySQL server has gone away [for Statement "SELECT `first_seen`, `last_seen`, `reviewed_by`, `reviewed_on`, `comments`, CONV(checksum, 10, 16) AS checksum_conv FROM `percona`.`ptqd_r` WHERE checksum=CONV(?, 16, 10)" with ParamValues: 0='0EE57D0F76A951F2'] at /home/revin/bin/pt-query-digest line 8571.
Terminating pipeline because process 4 (iteration) caused too many errors.
[revin@forge msb_5_5_25]$ ^C
[revin@forge msb_5_5_25]$

<session #2>
[revin@forge share]$ cd ~
[revin@forge ~]$ ps aux|grep 5_5_25
revin 9606 0.0 0.2 488552 40504 ? Sl 01:43 0:00 /wok/bin/mysql/5.5.25/bin/mysqld --defaults-file=/ssd/sb/msb_5_5_25/my.sandbox.cnf --basedir=/wok/bin/mysql/5.5.25 --datadir=/ssd/sb/msb_5_5_25/data --plugin-dir=/wok/bin/mysql/5.5.25/lib/plugin --log-error=/ssd/sb/msb_5_5_25/data/msandbox.err --pid-file=/ssd/sb/msb_5_5_25/data/mysql_sandbox5525.pid --socket=/tmp/mysql_sandbox5525.sock --port=5525
revin 9653 0.0 0.0 103340 1024 pts/33 S+ 01:46 0:00 grep 5_5_25
revin 31225 0.0 0.0 106328 1552 ? S Jun25 0:00 /bin/sh /wok/bin/mysql/5.5.25/bin/mysqld_safe --defaults-file=/ssd/sb/msb_5_5_25/my.sandbox.cnf
[revin@forge ~]$ kill -9 9606
[revin@forge ~]$

Revision history for this message
Jervin R (revin) wrote :
tags: added: connection pt-query-digest
Changed in percona-toolkit:
status: New → Triaged
Brian Fraser (fraserbn)
Changed in percona-toolkit:
assignee: nobody → Brian Fraser (fraserbn)
Changed in percona-toolkit:
assignee: Brian Fraser (fraserbn) → nobody
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/PT-999

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.