Error 1236 looks like this from SHOW SLAVE STATUS
:
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: ‘Client requested master to start replication from position > file size’
In other words, the replica is requesting data at a certain point in the log (its current position), but the master’s log file doesn’t reach that point (so there are missing entries). Replication stops because because this is a logic error: if a replica is caught up to X, then the master must have been at at least X, but it’s not! One reason why this may happen is if MySQL hasn’t flushed all of the data in the binlog to disk.
When might MySQL do that? When sync_binlog = 0
. Read
more about that variable in the MySQL docs.
Diagnosis
…
[Read more]