# Problem with pt-table-sync

**URL:** <https://forums.percona.com/t/problem-with-pt-table-sync/2553>\
**Category:** Percona Toolkit\
**Created:** [April 17, 2012, 2:34pm UTC](https://forums.percona.com/t/problem-with-pt-table-sync/2553 "2012-04-17T14:34:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jago](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jago](https://forums.percona.com/u/jago)\
**Post date:** [April 17, 2012, 2:34pm UTC](https://forums.percona.com/t/problem-with-pt-table-sync/2553/1 "2012-04-17T14:34:47Z")

</div>

I am using pt-table-sync to determine whether our replicated databases are in sync. All servers are running the same version of CentOS (6.2) and the same version of MySQL (Percona 5.5.20-55-log). The version of pt-table-sync we are using is 2.1.1.

Our replication setup is like this:

A → B (high-speed connection)  
B → C (high-speed connection)  
B → D (LOW-speed connection)  
D → E (high-speed connection)  
D → F (high-speed connection)

Here’s the pt-table-sync command I am using:

pt-table-sync --print --wait 12000 --no-check-triggers   
–ignore-databases=information\_schema,performance\_schema,mys ql,arch   
–tables=exp.schedule,fbp.user\_sp\_term,fbp.user\_syllabus\_ite m   
–sync-to-master   
h=(appropriate IP),u=dba,p=???

I have not had any problems using this command where there is a high-speed network connection, but I get the following error message _every_ time I use it over our LOW-speed connection:

DBD::mysql::db commit failed: MySQL server has gone away at /usr/bin/pt-table-sync line 8821.  
Issuing rollback() for database handle being DESTROY’d without explicit disconnect().

I have increased the “–wait” to the current 12000, but that does not seem to help.

Am I using the command incorrectly? Is there another parameter that I need to be using? I will appreciate any assistance.

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [April 17, 2012, 7:57pm UTC](https://forums.percona.com/t/problem-with-pt-table-sync/2553/2 "2012-04-17T19:57:33Z")

</div>

–wait might not do what you think. You might need to use --set-vars and add wait\_timeout to it.

---

<div class="post-metadata">

**Author:** ![jago](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jago](https://forums.percona.com/u/jago)\
**Post date:** [April 24, 2012, 7:59am UTC](https://forums.percona.com/t/problem-with-pt-table-sync/2553/3 "2012-04-24T07:59:17Z")

</div>

Baron, thank you. My sync check finally worked when I changed the command to:

pt-table-sync --print --wait 24000 --set-vars wait\_timeout=24000 --no-check-triggers   
–ignore-databases=information\_schema,performance\_schema,mys ql,arch   
–tables=exp.schedule,fbp.user\_sp\_term,fbp.user\_syllabus\_ite m   
–sync-to-master   
h=(appropriate IP),u=dba,p=???

This particular slave is connected to its master over a T1 connection…all other connections are either 100M or 1G.

Thanks again.
