cannot open databases, lock failed, file exists

Alex mysqlstudent at
Fri Oct 28 01:11:26 CEST 2011


>> I have a spamassassin-v3.3.2, amavisd-2.6.6 on fedora15. I'm working
>> on trying to do some performance tuning. During the normal course of
>> operation, I have the following messages in the logs:
>> Oct 25 13:31:36 mail02 amavis[20312]: (20312-01-30) _WARN: bayes:
>> cannot open bayes databases /var/spool/amavisd/.spamassassin/bayes_*
>> R/W: lock failed: File exists
>> Is this a result of having too many amavisd processes running at once?
> More likely: too many amavisd processes trying to do an auto-expiry
> run at once. A workaround is to disable bayes auto-expiration
> and expire tokens periodically by: sa-learn --force-expire.

Yes, auto-expiry was already disabled.

> Btw, you do have a 'lock_method flock' in, don't you?

I hadn't heard of that before, so have now added it. It only happened
a few times (at least that I noticed), and only under extreme load, so
I also suspect it was a locking issue?

> A better solution is to move bayes database to SQL, as Robert
> suggested.

Yes, have now done this, but the document referenced is cut down too
much from the original, and has several problems.

To start, the schema doesn't work with current versions of mysql. Use
this one instead:

I'm also having problems with the AWL instructions from that document.
It seems I don't have an existing AWL to convert to be imported into
mysql. How do I now create and begin to use the auto-whitelist?

Thanks again,

More information about the amavis-users mailing list