mysql second slave not syncying while first slave works fine

I have a master (m) - slave (s1) setup using mysql 5.1.45

When I try to add a second slave (s2) the slave lags behind and never catches up on the sync.

Even after having synced the s2 with the whole system offline and there were (Seconds_Behind_Master = 0) after a few hours the s2 gets out of sync.

Strange is that s1 is always on sync.

any ideas?

Well, definitely not a Xtrabackup issue.

There are many factors that can generate that one server gets out of sync and the other no.

1- Hardware diferences, Maybe s1 have a better performance than s2
2- Different workload, You can check the slow log to check what is happening.
3- Different configurations, Maybe the buffers and configurations are not the same in both servers. You can use http://www.percona.com/doc/percona-toolkit/2.1/pt-config-dif f.html to check that.
4- Different MySQL versions.

Also remember that queries in the master are in paralel and in the salves are serialized.

Regards,

Martin

Yes I know this is not an xtrabackup error.

Lets clear the factors that you mention:

1: Hardware is similar. I have actually tried twice to sync, one with a similar specs server and the second with a better specs server. Both times s2 lagged behind eventually.

2: The slave (s2) is not in production until satisfied that the syncing was succesful, so both times the slave (s2) was doing nothing more.

3: Same configs

4: same mysql versions

I understand the way replication works.

The problem is that I have a master and a slave (s1) that syncs perfectly and I can not get the second slave (s2) to sync.

In th epast I had 2 slaves syncing perfectly !!!