You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by David Baron <d_...@012.net.il> on 2006/05/15 22:34:38 UTC

Another New Problem, cannot open bayes databases

spamd[1697]: bayes: cannot open bayes databases .../.spamassassin/bayes_* R/W: 
lock failed: File exists.

I get a bunch of these now. The ~/.spamassassin directory has:ls
auto-whitelist  bayes_seen  bayes_toks.expire6293
bayes_journal   bayes_toks  user_prefs

They are NOT in the locate database. Some of these are quite large.

Should these be deleted? Automatically? Kept?
Their modification times do NOT correspond to any "sa-learn" I executed.

Re: Another New Problem, cannot open bayes databases

Posted by Matt Kettler <mk...@evi-inc.com>.
David Baron wrote:
> spamd[1697]: bayes: cannot open bayes databases .../.spamassassin/bayes_* R/W: 
> lock failed: File exists.
> 
> I get a bunch of these now. The ~/.spamassassin directory has:ls
> auto-whitelist  bayes_seen  bayes_toks.expire6293
> bayes_journal   bayes_toks  user_prefs
> 
> They are NOT in the locate database. Some of these are quite large.
> 
> Should these be deleted? Automatically? Kept?

Some should be kept, some should be deleted automatically.


bayes_toks - This IS your bayes database, it should be kept in most cases. It's
not uncommon for this file to be fairly large (10-20M), but its size should be
regulated by expiry.

bayes_seen - This is the list of message-id's already trained to the database.
It should be kept in most cases. Unfortunately, SA never expires the data in
this file, so if it gets huge you can shutdown SA, delete it, and restart SA
(WARNING: deleting the file is only safe in SA 3.0 and higher)

auto-whitelist - This is your AWL database, it should be kept in most cases. If
it gets large use "check-whitelist --clean". If you don't have it installed,
check-whitelist can be found in the tools directory of the tarball for SA.

bayes_journal - Used as short-term storage for autolearn data. This prevents
autolearning from having to lock down the whole bayes DB. Instead, new learning
is recorded here, and a couple times a day this gets synced in, and deleted.
Further auto-learning should recreate it. In general you should never have to
touch this file, and it should always be fairly small relative to bayes_toks.

bayes_toks.expire#### - This is a temporary file created when bayes expiry is
going on. Expiry by default occurs automatically a couple times a day during
message scans. It also occurs when you manually run sa-learn --force-expire.
#### represents the process ID of the SA instance currently running expiry. This
should get auto-deleted when expiry completes. However, if SA gets killed or
crashes for some reason, this file will get left behind.  Check to see if
process 6293 is still running.



> Their modification times do NOT correspond to any "sa-learn" I executed.

That's not surprising. SA does autolearning and auto-expiry by default, so these
files get rewritten frequently.