# Strange replication stucks "waiting for GTID to be written to binary log"

**URL:** <https://forums.percona.com/t/strange-replication-stucks-waiting-for-gtid-to-be-written-to-binary-log/5229>\
**Category:** Percona Server for MySQL 5.6\
**Created:** [November 23, 2016, 3:05am UTC](https://forums.percona.com/t/strange-replication-stucks-waiting-for-gtid-to-be-written-to-binary-log/5229 "2016-11-23T03:05:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shinkei](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@shinkei](https://forums.percona.com/u/shinkei)\
**Post date:** [November 23, 2016, 3:05am UTC](https://forums.percona.com/t/strange-replication-stucks-waiting-for-gtid-to-be-written-to-binary-log/5229/1 "2016-11-23T03:05:11Z")

</div>

There is a problem with the replication.  
The slave between db2 and pxc stucks with the message “waiting for GTID to be written to binary log”. In this case there is no error message. Meters “Seconds\_Behind\_Master” grows.

In binary logs can be seen that replication is stopped after the “commit” command.  
Replication restart does not help (stop slave, start slave, reset slave).  
Only restarting mysql process helps.

db1 masked on pxc using replicate\_ignore\_db.

Versions and settings:

pxc  
centos7  
5.6.28-76.1-56-log  
binlog\_format = ROW  
log-slave-updates = 1  
gtid\_mode = ON  
enforce\_gtid\_consistency = 1  
wsrep\_restart\_slave = 1

db1  
centos 7  
5.6.30-76.3-log  
gtid\_mode = ON  
log\_slave\_updates = 1  
enforce\_gtid\_consistency = ON

db2  
centos 7  
gtid\_mode = ON  
log\_slave\_updates = 1  
enforce\_gtid\_consistency = ON

Between db1 and db2 - auto\_position = 1  
Between dv1 (db2) and pxc - auto\_position = 0

 ![photoid=46480](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/2/2fb38b12d69707e86b816e9e48f67db1bbd1df4a.jpeg)
