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

Reported by Jervin R on 2012-06-27
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit
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 ~]$

tags: added: connection pt-query-digest
Changed in percona-toolkit:
status: New → Triaged
Brian Fraser (fraserbn) on 2012-08-13
Changed in percona-toolkit:
assignee: nobody → Brian Fraser (fraserbn)
Changed in percona-toolkit:
assignee: Brian Fraser (fraserbn) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers