Relay log write failure: could not queue event from master, Error_code: 1595

If you check slave status and see this error check your log. Most probably you will find something like this:

[ERROR] Slave I/O: Replication event checksum verification failed while reading from network. Error_code: 1743
[ERROR] Slave I/O: Relay log write failure: could not queue event from master, Error_code: 1595

What this tells you is that relay log on your slave is corrupted.
To solve the problem you need to clean up your relay logs and restart replication, easiest way to do this is to check your current position (show slave status\G) and read Master_Log_File and Exec_Master_Log_Pos. Then

stop slave;
change master to  \
— replace Master_Log_File
— and Exec_Master_Log_Pos
— with real data you read from show slave status
start slave;

The big chance is that the error will be hit again. If this happens your problem is more serious. There are three major reasons for this

1. you have broken hw on slave (usually broken ram on raid controller, broken hdd..)
2. your ethernet sucks (broken switches, routers, ethernet cards)
3. you have corrupted binlog on master.

Most likely is the third option – the binlog is corrupted on master and transfered to slave as is. If this is the case the only way to solve the problem is to clean up (purge) all binlogs on master and rebuild your slave from scratch (yes I know, sorry). The reasons for binlog corruption on master are again hardware errors (hdd, raid..) but what’s the most likely reason for them is disk space, if you hit “disk full” error there’s a big chance mysql will corrupt binlogs :(


VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

MySQL general architecture

A friend and ex colleague of mine, Steward Smith, already wrote a great post on this topic so I suggest you read it directly on his blog :)

Moj prijatelj i bivši kolega Steward Smith je napisao odličan post na ovu temu te predlažem da pročitate original. Ako ne govorite engleski dostupan je Google translate.

VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Leave a Reply