On 4/24/2013 2:42 PM, psychobyte wrote: > Hi, > > I've noticed that SA is getting a lot of "Duplicate entry" errors for > AWL and bayes plugins. I can verify that the sql schema is up to date > for SA 3.3.1-r4 and I've tried retraining the bayes db. Any hints on how > to troubleshoot this? > > AWL: > > Apr 24 11:31:57 mserv amavisd[24336]: (24336-05) SA dbg: auto-whitelist: > sql-based add_score/insert amavis|myem...@example.com|14.43|1|-0.699: > SQL error: Duplicate entry 'amavis-myem...@example.com--14.43' for key > 'PRIMARY' > > > Bayes: > > Apr 24 11:31:57 mserv amavisd[24336]: (24336-05) SA dbg: bayes: > _put_token: SQL error: Duplicate entry '1-\312\270j' for key 'PRIMARY' > > > >
I know very little about how Bayes interacts with SQL, but it's clear that SA is trying to insert a record that is identical to one that's already present, and the key(s) that are defined on the table are preventing it. Makes one wonder if a "REPLACE INTO ..." was replaced with an "INSERT INTO ..." in a recent version of SA. Of course, the messages that you're seeing tell us nothing about which DB table is causing the problem. Maybe one of the developers will see this and recall making such a change. Alternatively, you could dig into your tables and attempt to identify where those values actually live. Once we have the offending table, further troubleshooting will be possible. -Ben