Debugging SA timeouts

Nathan Johanson nathan at TCPNETWORKS.NET
Wed Mar 10 14:50:41 GMT 2004


> Ok for reason since moving the 4.28.x I'm seeing alot of 
> files of the type
> 
> bayes_toks.expire1123
> 
> in my bayes db directory.
> 
> Why? never occurred in 4.24.5..

This sounds like the issue that spawned Julian's inclusion of the
"Rebuild Bayes Every" option in MailScanner. SpamAssassin tries to
opportunistically rebuild and expire tokens and doesn't complete within
the timeout period. You'll usually end up with several lock files and
accumulating *.expire files in your bayes directory. Ultimately,
SpamAssassin will start to time out.

To restore things back to normal:

(1) Delete the *.lock and *.expire files. 
(2) Turn off opportunistic expire of tokens in SpamAssassin.

bayes_auto_expire 0

(2) Use the "Rebuild Bayes Every" option in MailScanner or create cron
job that runs the following command (I do this every 24 hours).

sa-learn --debug-level --prefs-file=$PREFS --rebuild --force-expire

I have the logs sent to me via email so that I can confirm that it's
working as expected. No problems since implementing this.

Nathan




More information about the MailScanner mailing list