There are some variables that can affect the replication behavior and sometimes cause some big troubles. In this post I’m going to talk about read_buffer_size and how this variable together with max_allowed_packet can break your replication.
The setup is a master-master replication with the following values:
max_allowed_packet = 32M
read_buffer_size = 100M
To break the replication I’m going to load the 4 million rows with LOAD DATA INFILE:
MasterA (test) > LOAD DATA INFILE '/tmp/data' INTO TABLE
t;
Query OK, 4510080 rows affected (26.89 sec)
After some time the SHOW SLAVE STATUS on MasterA gives us this output:
Last_IO_Error: Got fatal error 1236 from master when
reading data from binary log: 'log event entry exceeded
max_allowed_packet; Increase max_allowed_packet on
master; the first event 'mysql-bin.000002' at 74416925, …