# MySQL Server has gone away pt-query-digest

**URL:** <https://forums.percona.com/t/mysql-server-has-gone-away-pt-query-digest/2563>\
**Category:** Percona Toolkit\
**Created:** [May 29, 2012, 9:42am UTC](https://forums.percona.com/t/mysql-server-has-gone-away-pt-query-digest/2563 "2012-05-29T09:42:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcesario](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jcesario](https://forums.percona.com/u/jcesario)\
**Post date:** [May 29, 2012, 9:42am UTC](https://forums.percona.com/t/mysql-server-has-gone-away-pt-query-digest/2563/1 "2012-05-29T09:42:52Z")

</div>

I have a slow log which always ends with this.

slow.log: 99% 00:15 remain

It then spits out this error and repeats it until the process is stopped.

Pipeline process 4 (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 `slow_query_log`.`query_review` WHERE checksum=CONV(?, 16, 10)” with ParamValues: 0=‘D8703A6195E126FD’] at /usr/local/bin/pt-query-digest line 8672.

PT  
pt-query-digest --user=$user --password=$password --review S=$socket,D=slow\_query\_log,t=query\_review --review-history S=$socket,D=slow\_query\_log,t=query\_review\_history --no-report --limit=0% --filter=" $event-\>{Bytes} = length($event-\>{arg}) and $event-\>{hostname}="$HOSTNAME"" $1

$ rpm -q perl-DBD-MySQL  
perl-DBD-MySQL-3.0007-2.el5

Slow Log Info

Percona Server 5.1.60

du -hs slow.log  
72G slow.log

percona-toolkit-2.1.1

---

<div class="post-metadata">

**Author:** ![revin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/revin/32/824_2.png) [@revin](https://forums.percona.com/u/revin)\
**Post date:** [June 27, 2012, 12:25am UTC](https://forums.percona.com/t/mysql-server-has-gone-away-pt-query-digest/2563/2 "2012-06-27T00:25:09Z")

</div>

This is a bug, I just reported about it here [URL][https://bugs.launchpad.net/percona-toolkit/+bug/1018258[/URL]](https://bugs.launchpad.net/percona-toolkit/+bug/1018258%5B/URL%5D)

How long has ptqd been running before it bombs out? You can try increasing wait\_timeout, by default ptwd sets it to 10000 i.e. --set-vars wait\_timeout=28800

---

<div class="post-metadata">

**Author:** ![davidchildersks](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@davidchildersks](https://forums.percona.com/u/davidchildersks)\
**Post date:** [September 25, 2012, 7:47pm UTC](https://forums.percona.com/t/mysql-server-has-gone-away-pt-query-digest/2563/3 "2012-09-25T19:47:13Z")

</div>

revin wrote on Tue, 26 June 2012 22:55

> [@](#):
>
> This is a bug, I just reported about it here [https://bugs.launchpad.net/percona-toolkit/+bug/1018258](https://https)
> 
> How long has ptqd been running before it bombs out? You can try increasing wait\_timeout, by default ptwd sets it to 10000 i.e. --set-vars wait\_timeout=28800

I agree. Whenever I’ve seen the “MySQL server has gone away” error message, MySQL server really hasn’t gone away - but the connection has timed out.

The connection wait\_timeout variable can be set ‘on the fly’ by issuing:

mysql\> set global wait\_timeout=\<numeric\_value\>

at the MySQL command line client.

If you do this, be sure to add it to your /etc/my.cnf file so that the configuration survives any restart of MySQL.

I hope this helps.

/David C.
