# pt-table-sync - prevent master lockup on busy server?

**URL:** <https://forums.percona.com/t/pt-table-sync-prevent-master-lockup-on-busy-server/2573>\
**Category:** Percona Toolkit\
**Created:** [August 6, 2012, 10:07pm UTC](https://forums.percona.com/t/pt-table-sync-prevent-master-lockup-on-busy-server/2573 "2012-08-06T22:07:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![utdrmac](https://avatars.discourse-cdn.com/v4/letter/u/e274bd/32.png) [@utdrmac](https://forums.percona.com/u/utdrmac)\
**Post date:** [August 6, 2012, 10:07pm UTC](https://forums.percona.com/t/pt-table-sync-prevent-master-lockup-on-busy-server/2573/1 "2012-08-06T22:07:45Z")

</div>

We have a simple master-\>slave set up. Trying to use pt-table-sync to bring slave in sync with master. Can’t use the replication method because we are so far out of sync.

Problem is, the SELECT statements on the master block/lock other INSERT queries coming in from our app.

Is there a way to make pt-t-s wait a second after each Nibble SELECT so that other queries have time to run?

Tried using --buffer-in-mysql, --lock 0, --lock 1, --transaction to no help.

All tables InnoDB.

Ideas?

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [August 7, 2012, 3:01am UTC](https://forums.percona.com/t/pt-table-sync-prevent-master-lockup-on-busy-server/2573/2 "2012-08-07T03:01:09Z")

</div>

Hi,

Can you please provide exact command line which you are using to run pt-table-sync? AFAIK, --transaction option should definitely help you for locking issue except you are using --lock and --transaction options at the same time.

Please also provide Percona Toolkit Version.

---

<div class="post-metadata">

**Author:** ![utdrmac](https://avatars.discourse-cdn.com/v4/letter/u/e274bd/32.png) [@utdrmac](https://forums.percona.com/u/utdrmac)\
**Post date:** [August 7, 2012, 4:59pm UTC](https://forums.percona.com/t/pt-table-sync-prevent-master-lockup-on-busy-server/2573/3 "2012-08-07T16:59:15Z")

</div>

Tried all of the following. None helped. While the SELECT statements were running on the master, INSERT statements were piling up and then timing out being unable to get lock within ‘innodb-wait-lock-timeout’ period. v 2.1.1

pt-table-sync h=deb058,P=3309,D=azuredb,t=day\_5 h=sus042,P=3309 --no-bin-log --executept-table-sync h=deb058,P=3309,D=azuredb,t=day\_5 h=sus042,P=3309 --no-bin-log --execute --transactionpt-table-sync h=deb058,P=3309,D=azuredb,t=day\_5 h=sus042,P=3309 --no-bin-log --execute --no-transaction --lock 1pt-table-sync h=deb058,P=3309,D=azuredb,t=day\_5 h=sus042,P=3309 --no-bin-log --execute --no-transaction --lock 1pt-table-sync h=deb058,P=3309,D=azuredb,t=day\_5 h=sus042,P=3309 --no-bin-log --execute --buffer-in-mysqlpt-table-sync h=deb058,P=3309,D=azuredb,t=day\_5 h=sus042,P=3309 --no-bin-log --execute --buffer-in-mysql --lock 0
