I have two dbmail 2.2.17 servers using MySQL in a multi-master setup. I only have pop3, imap and lmtp running on the primary master and all incoming mail is received on the primary master. Basically the second master is a hot standby for failover. Every few days the replication breaks and I receive the following error.
Error 'Cannot add or update a child row: a foreign key constraint fails (`dbmail`.`dbmail_messages`, CONSTRAINT `dbmail_messages_ibfk_2` FOREIGN KEY (`mailbox_idnr`) REFERENCES `dbmail_mailboxes` (`mailbox_idnr`) ON DELETE CASCADE)' on query. Default database: 'dbmail'. Query: 'INSERT INTO dbmail_messages (mailbox_idnr,physmessage_id, seen_flag, answered_flag, deleted_flag, flagged_flag, recent_flag, draft_flag, unique_id, status) SELECT 16035, physmessage_id, seen_flag, answered_flag, deleted_flag, flagged_flag, recent_flag, draft_flag, '8f699cfd90680edadf04b114525cb829', status FROM dbmail_messages WHERE message_idnr = 156606921' My second master is acting as a slave and no data is being sent to the primary master via replication so I'm not sure where this error is coming from. Maybe some type of temp table on the primary master that doesn't make it over to the secondary master? -- View this message in context: http://old.nabble.com/Multi-Master-Replication-tp30663509p30663509.html Sent from the dbmail users mailing list archive at Nabble.com. _______________________________________________ DBmail mailing list [email protected] http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
