cannot open databases, lock failed, file exists

Mark Martinec Mark.Martinec+amavis at ijs.si
Tue Oct 25 21:21:07 CEST 2011


Alex,

> 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.

Btw, you do have a 'lock_method flock' in local.cf, don't you?

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

  Mark


More information about the amavis-users mailing list