Hi, It could be a hardware issue, as if you do not use RAID and you have bad sectors or the likes. But the most common cause could be a server crash.
The INSERT or transaction was partially completed when server crash. When the slave is then restarted, it will try to execute the transaction/statement again *from the beginning*, and will fail since some of the rows were already added to the table. The situation occurs also if you are using MyISAM tables and a statement outside a transaction is interrupted. Thanks, On Thu, Nov 10, 2011 at 6:08 AM, Steven Staples <sstap...@mnsi.net> wrote: > My Apologies, > > The tables are all MyISAM, most of the inserts/updates/deletes are done > through stored procedures on the master. There are about 2 stored > procedure > calls per second, consisting of a whole bunch of queries, updates, and > inserts within them. > > The latest issue(s) we're having, are: > > Could not execute Write_rows event on table xxx.xxxxx; Duplicate entry > '201111-00001016792' for key 'PRIMARY', Error_code: 1062; handler error > HA_ERR_FOUND_DUPP_KEY; the event's mas > > Could not execute Write_rows event on table xxx.xxxxx; Duplicate entry > '44870420' for key 'PRIMARY', Er > > Update_rows event on table xxx.xxxxx; Can't find record in 'xxxxx', > Error_code: 1032; handler error HA_ERR_KEY > > (Where xxx is the databse, and xxxxx is the table) > > The replication broke yesterday morning for some reason, and the primary > key > index was at around 900,000. When we found out it was down, and ended up > getting to work on it, we tried to restart it and the next ID it was > inserting for was 1,016,792. So we're missing about 100,000 enteries, and > they are not in the bin log (as far as I can see). > > > Steve. > > > -----Original Message----- > > From: Reindl Harald [mailto:h.rei...@thelounge.net] > > Sent: November 10, 2011 8:42 AM > > To: mysql@lists.mysql.com > > Subject: Re: Relication Issues > > > > replication is buggy sometimes > > > > but without any outputs desribing your problem nobody can really help you > - > > memory tables as example are making much more troubles as myisam > > > > Am 10.11.2011 14:26, schrieb Steven Staples: > > > Good morning list, > > > > > > I am having issues with my replication setup. it seems that every few > > > weeks/months something happens, and I have to restart it, skip a row, > > > or delete, rsync and restart replication from scratch. > > > > > > The databases that are being replicated, are rather large... there are > > > about > > > 12 new tables every year, each consisting of about 2-4g in size each > > > (today's total database size is 83g). > > > > > > Again, things work fine for a while, and then there are issues. The > > > backup/slave is on the same network/datacenter, so network speed isn't > an > > > issue. I just don't understand why inconsistencies keep arising. Is > > there > > > a better way to do live backups, or have a hot space in the event of a > > > catastrophe? Is there 3rd party software that would better achieve > data > > > integrity or something? > > > > > > Any help here would be appreciated. > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/mysql?unsub=aim.prab...@gmail.com > > -- Best Regards, Prabhat Kumar MySQL DBA My Blog: http://adminlinux.blogspot.com My LinkedIn: http://www.linkedin.com/in/profileprabhat