Replication Failure on Slave

2 views
Skip to first unread message

Alex K

unread,
Feb 16, 2009, 2:27:14 PM2/16/09
to scalr-discuss
Hello,

I have been using Scalr for production use for a few months now and
I'm very happy with it. I am using a Master/Slave setup on the 64 bit
instance, running against a Rails instance. However, in the last week
or two, I have been getting MySQL Replication failures every few
days. The error says "Error 'Duplicate entry '178344' for key 1' on
query. ...." Not sure why it would be attempting to insert the same
record twice. I am using int-mysql-master for the database DNS. If
I look at the MySQL status, I see "Queueing master event to the relay
log" on the slave IO state, and the binary log is at a different
position than the Master. At this point I usually just terminate the
slave instance and let Scalr instantiate a new one.

Has anyone seen this, or has any ideas on what could be causing this?

Thanks,

Alex

Nickolas Toursky

unread,
Feb 17, 2009, 11:01:19 AM2/17/09
to scalr-...@googlegroups.com
Such an error arises when you try to insert a row to a table on the
slave server and then master sends an event with the same key value. I
would recommend you to check your code to see if such a situation
possible.
The other possible reason for this error is a corrupt snapshot. If you
have no doubts about your code, then we need your farm id so we will
be able to check snapshot integrity manually.
Reply all
Reply to author
Forward
0 new messages