3

We have MySQL replication running for our application. Right now the slave fails to resume if it fails to connect to the server for some time.

We get the error below:

[ERROR] Slave I/O: error connecting to master 'replication-user@master-ip:3306' - retry-time: 60  retries: 186, Error_code: 1045

The above is possible because of power failure or network problems. Once the issue is fixed and it is able to connect to the master server it tries to resume but most of the times it fails with the error below:

[ERROR] Slave SQL: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Error_code: 1594

I followed this question and solved this problem by resetting the slave to last read relay-bin file and position. The problem is that the connection failure has become very frequent and we need to do the same thing pretty often.

What could be the possible reason of this occurring over and over again? Is there a way to overcome this problem?

Note: We are using MySQL 5.6.30.

5
  • We need to work to see what is this problem !! 1. Have you found the issue and a fix for it already ? 2. Any similarity while the error occurs. Let it be time or business activity or any other similar details from the incidents you have come across. 3. What are the events found in binlog on Master at the time of issue? 4. Any network graph that tells the fluctuation in n/w? And that coincides the time of this issue.
    – Mannoj
    Commented Jun 16, 2017 at 9:14
  • As I have mentioned in the question, it happens after it gets the connection error ?
    – Mritunjay
    Commented Jun 16, 2017 at 9:31
  • 1
    it happens -> What does this "it" refers to?
    – Mannoj
    Commented Jun 16, 2017 at 9:34
  • whenever the slave is not able to connect to Master, this is the error present in logs [ERROR] Slave I/O: error connecting to master 'replication-user@master-ip:3306' - retry-time: 60 retries: 186, Error_code: 1045.
    – Mritunjay
    Commented Jun 16, 2017 at 9:39
  • does it run if you use stop slave;set global sql_slave_skip_counter=1;start slave ? Commented Jan 9, 2019 at 17:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.