Slave "Got fatal error 1236" After Losing Connection to Master While Reading > 4GB Binlog

(Doc ID 2018766.1)

Last updated on SEPTEMBER 20, 2017

Applies to:

MySQL Server - Version 4.0 and later
Information in this document applies to any platform.

Symptoms

Here is how you can identify the scenario.  Given the error log snippet:

-----
[ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
[Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000002' at position 8919699927
[ERROR] Error reading packet from server: bogus data in log event; the first event 'mysql-bin.000002' at 329765335, the last event read from 'mysql-bin.000002' at 329765335, the last byte read from 'mysql-bin.000002' at 329765354. ( server_errno=1236)
[ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'bogus data in log event; the first event 'mysql-bin.000002' at 329765335, the last event read from 'mysql-bin.000002' at 329765335, the last byte read from 'mysql-bin.000002' at 329765354.', Error_code: 1236
------

Three artifacts that should be noted:  

Changes

Binary logs on the master are larger than 4GB in size. This often happens after changing the binlog_format from STATEMENT to ROW.

Another change might be some bulk import or other large transactions have started occuring on the master.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms