Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

mySQL replication

Posted on 2008-06-17
4
Medium Priority
?
1,063 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

661 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