Solved

mySQL replication

Posted on 2008-06-17
4
1,029 Views
Last Modified: 2012-06-27
I had a problem that after 6+ months of replication running smoothly and nothing changing in terms of config, or the type of transactions being replicated the slaves (3) stopped with the error:

Got fatal error 1236: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master' from master when reading data from binary log

I increased the max_allowed_packet and then the slaves appeared to start and run, ie no error when I do SHOW SLAVE STATUS.

On Slaves:
Slave_IO_State = Waiting for master to send event
Master_log_file = localhost-bin.188
Read_Master_Log_Pos = 90656760
Slave_IO_Running = Yes
Slave_SQL_Running = Yes
Last_Error = ""
Seconds_Behind_Master = 0

On Master:
File = localhost-bin.191
Position = 79

So question is why do slaves say 0 seconds behind, but they are not at the same point as the master?
0
Comment
Question by:dealclickcouk
4 Comments
 

Author Comment

by:dealclickcouk
ID: 21801839
ok now also increased max packets on the slave, and now in the error log on slave I see:

080617 12:18:58 [Note] Slave: connected to master 'xxxx@xxx.xxx.xxx.xx:3306',replication resumed in log 'localhost-bin.188' at position 90656760
080617 12:19:05 [ERROR] Error in Log_event::read_log_event(): 'Event too big', data_len: 38292594, event_type: 2
080617 12:19:05 [ERROR] Error reading relay log event: slave SQL thread aborted because of I/O error
080617 12:19:05 [ERROR] Error reading packet from server: log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master (server_errno=1236)
080617 12:19:05 [ERROR] Slave: 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: 0
080617 12:19:05 [ERROR] Got fatal error 1236: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master' from master when reading data from binary log
080617 12:19:05 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'localhost-bin.188' position 90656760
080617 12:19:05 [ERROR] Slave I/O thread exiting, read up to log 'localhost-bin.188', position 128949354


On the master I tried:

[root@localhost mysql]# mysqlbinlog localhost-bin.188 --position=128949354
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
ERROR: Error in Log_event::read_log_event(): 'Event too big', data_len: -1649410048, event_type: 0
Could not read entry at offset 128949354:Error in log format or read error


Any suggestion welcome....
0
 
LVL 29

Accepted Solution

by:
fibo earned 500 total points
ID: 21976078
Seems that sync was lost at some time and they have not been able to recover since, so the journals file grow significantly.

there are lots of possible causes, the most obvious one would be that the slave time is now ahead of master time... daylight saving (one hour)? slight slipping (1 to 30 seconds)? This should really be tested first...

Once you will have found the source of the time lag.... you may need to rebuild your sync to be sure that everything is now perfect
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now