Closed barttenbrinke closed 9 years ago
Could it be the cleanup cronjob for the login_tickets
table that causes the problem? Maybe deactivating the cleanup task on one of the instances would help.
That was my first guess as wel, but Mysql replication does a fine job of replicating range queries. As far as I can tell the UPDATE seems to be replicated BEFORE the insert or something?! I was hoping you might be able to point me to the code creating the tickets, so I could look around :)
There is nothing more to it than a single LoginTicket.create
call. Maybe you can track down what causes the Update_rows
event using the timestamps and the web log.
Closing this for now. Please post an update once you find the time to look into it.
I currently have the following setup:
DB1 inserts with EVEN ids and DB2 inserts with ODD ids. What happens is that replication stops because there are differences between the casino_login_tickets table on DB1 and the casino_login_tickets table on DB2.
The only explanation for this I can think of is that Casino uses something like row level locking for the login_tickets and that that causes some soft of racing? Only the login_tickets table is affected, all other tables are fine.
I've currently worked around the issue by letting CasinoServer1 point to DB2, but I was hoping to solve this in a nicer way.