Replication breaks reboot 'Cannot replicate because the source purged required binary logs' ca api gateway 11.1
search cancel

Replication breaks reboot 'Cannot replicate because the source purged required binary logs' ca api gateway 11.1

book

Article ID: 378701

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

It may occur that when rebooting a node you notice replication breaking with an error in show slave status like,

                Last_IO_Error: Got fatal error 1236 from source when reading data from binary log: 'Cannot replicate because the source purged required binary logs. Replicate the missing transactions from elsewhere, or provision a new replica from backup. Consider increasing the source's binary log expiration period. The GTID set sent by the replica is 'cf5f7d51-3c77-11ee-a400-5ee3580f4017:147-2632886,
d386eb1e-3c76-11ee-8c8d-3f653f0e877a:1-183', and the missing transactions are 'cf5f7d51-3c77-11ee-a400-5ee3580f4017:1-146''

Environment

CA API Gateway: 11.0, 11.1, 11.1.x

Resolution

If running mysql 8.0.29 and above AND you are currently running the provided script in cron to trim bin logs manage_binlogs.sh then you can disable mysql from purging the same logs by setting the variable 'binlog_expire_logs_auto_purge' equal to OFF

From the mysql host you can execute the following mysql command to accomplish this:

mysql 

set global binlog_expire_logs_auto_purge=OFF;

 

You can find more information on this setting within the following mysql documentation:

https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_expire_logs_auto_purge