Solved

mySQL replication

Posted on 2008-06-17
4
1,023 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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
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…

747 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

10 Experts available now in Live!

Get 1:1 Help Now