Larry Rosenman wrote:
> I just had my nice Bayes DB killed on a sa-learn that had 1300+
> messages in it.
> 
> What seemed to happen is the bayes.lock file got deleted by some
> spamd process EVEN THOUGH sa-learn WAS STILL ALIVE.

Most programs that use a separate file as a lock indicator (rather than
kernel-level file locking) have an explicit method to break that lock
"in case something else failed and left a stale lockfile around".  This
make sure that if a process that created a lock dies unexpectedly and
leaves the lock in place, other processes don't have to wait forever for
the "real" file to be "unlocked".

What I've done on the system-wide Bayes on the server here is to set 
bayes_learn_to_journal to 1, and always run sa-learn with --no-rebuild;
then set up a daily cron job to sync the journal.

So far, I've yet to see any major problems.  (~1 month with SA2.6x, ~3
with 2.5x.)

IMHO, kernel-level file locks are far cleaner, but I don't know whether
you can even do that cleanly with files accessed through DB_File.  :/

-kgd
-- 
"Sendmail administration is not black magic.  There are legitimate
technical reasons why it requires the sacrificing of a live chicken."
   - Unknown


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to