Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-999

LP #1018258: pt-query-digest does not reconnect to MySQL when connection is lost

    XMLWordPrintable

    Details

      Description

      **Reported in Launchpad by Jervin R last update 20-06-2013 19:58:06

      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 ~]$

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              lpjirasync lpjirasync (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: