OT: bayes in MySQL with replication

Jason Ede J.Ede at birchenallhowden.co.uk
Fri Feb 22 12:00:13 GMT 2008


(sent 2ce as I think it was blocked first time due to random binary characters)

I know this is way off topic, but I'm guessing others have had this and have solved it...

Since our 2 mail servers are on different sites and the VPN between them hasn't been overly reliable I've been trialling the bayes in MySQL with Master - Master replication. (MySQL 5.0)

This seems to work fine for a few hours and I then get...

080222 10:38:07 [ERROR] Slave: Error 'Duplicate entry '<random binary>' for key 1' on query. Default database: 'sa_bayes'. Query: 'INSERT INTO bayes_token
                   (id, token, spam_count, ham_count, atime)
                   VALUES ('1','<random binary>','0','1','1203675610')', Error_code: 1062
080222 10:38:07 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000006' position 8791360

and SQL replication stops. Is there any way of avoiding this or of specifying a default action in case of a clash like this?

Currently each mailserver connects to the local copy of the database.

Jason

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20080222/bddc1d95/attachment.html


More information about the MailScanner mailing list