Mysql Data Synchronization Relay log read failure: cocould not parse relay log

Source: Internet
Author: User
Tags mysql code

Error message:
Mysql> show slave status \ G
* *************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: IP
Master_User: repl
Master_Port: 3306
Connect_Retry: 30
Master_Log_File: mysql-bin.x
Read_Master_Log_Pos: pos_x
Relay_Log_File: relay-bin.y
Relay_Log_Pos: pos_y
Relay_Master_Log_File: mysql-bin.z
Slave_IO_Running: Yes
Slave_ SQL _Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_errno.: 1594
Last_Error: Relay log read failure: cocould not parse relay log event entry. the possible reasons are: the master's binary log is upted (you can check this by running 'mysqlbinlog' on the binary log ), the slave's relay log is already upted (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.
Skip_Counter: 0
Exec_Master_Log_Pos: pos_z
Relay_Log_Space: 4132423412
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_ SQL _Errno: 1594
Last_ SQL _Error: Relay log read failure: cocould not parse relay log event entry. the possible reasons are: the master's binary log is upted (you can check this by running 'mysqlbinlog' on the binary log ), the slave's relay log is already upted (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.
1 row in set (0.00 sec)
 
 
I read some online solutions
 
It is not feasible if you do not try it.
 
After a closer look, the slave server only finds that the memory usage is too high.
 
Read mysql logs
110714 6:55:28 [ERROR] Error reading packet from server: Lost connection to MySQL server during query (server_errno = 2013)
110714 6:55:28 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000046' at postion 297414128
110714 13:33:31 [ERROR] MYSQL_slave: Out of memory (Needed 808236 bytes)
110714 13:33:31 [ERROR] Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit 'to allow mysqld to use more memory or you can add more swap space
110714 13:33:41 [ERROR] MYSQL_slave: Out of memory (Needed 808236 bytes)
110714 13:33:41 [ERROR] Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit 'to allow mysqld to use more memory or you can add more swap space
110714 13:33:51 [ERROR] MYSQL_slave: Out of memory (Needed 808236 bytes)
110714 13:33:51 [ERROR] Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit 'to allow mysqld to use more memory or you can add more swap space
110714 13:34:01 [ERROR] MYSQL_slave: Out of memory (Needed 808236 bytes)
110714 13:34:01 [ERROR] Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit 'to allow mysqld to use more memory or you can add more swap space
110714 13:34:01 [ERROR] MYSQL_slave: Out of memory (Needed 808236 bytes)
110714 13:34:01 [ERROR] Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit 'to allow mysqld to use more memory or you can add more swap space
110714 14:25:16 [ERROR] MYSQL_slave: Out of memory (Needed 26819862 bytes)
110714 14:25:16 [ERROR] Error in Log_event: read_log_event (): 'found invalid event in binary log', data_len: 26819824, event_type: 2
110714 14:25:16 [ERROR] Error reading relay log event: slave SQL thread aborted because of I/O error
110714 14:25:16 [ERROR] Slave SQL: Relay log read failure: cocould not parse relay log event entry. the possible reasons are: the master's binary log is upted (you can check this by running 'mysqlbinlog' on the binary log ), the slave's relay log is already upted (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
110714 14:25:16 [ERROR] Slave (additional info): Out of memory (Needed 26819862 bytes) Error_code: 5
110714 14:25:16 [Warning] Slave: Out of memory (Needed 26819862 bytes) Error_code: 5
110714 14:25:16 [ERROR] Error running query, slave SQL thread aborted. fix the problem, and restart the slave SQL thread with "SLAVE START ". we stopped at log 'mysql-bin.000046 'position 517103753


It seems that the memory is not enough, so I stopped several services and then stopped slave; slave start; Problem Solving

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.