On Wed, 12 Feb 2020 18:03:01 +0000 (UTC) Pedro David Marco wrote: > Hi.. > i am getting errors from Byes because it is not able to lock Bayes > files... Error log is: > bayes: cannot open bayes databases /etc/spamassassin/bayes/bayes_* > R/W: lock failed: Interrupted system call > > > SA tries to lock bayes files always in "EXclusive mode", hence when > a sa takes too long, all other processes have to wait for the lock... > > This is my config: > use_bayes 1bayes_path /etc/spamassassin/bayes/bayesbayes_auto_learn > 0bayes_auto_expire 0lock_method flock > > SA uses EXclusive lock because it has "to write"... my question > is... Is there any way to avoid SA writing Bayes files? in that > case a non-exclusive lock would be enough... Thanks!
Bayes doesn't write on scans (unless it does an opportunistic sync or expiry): $ printf '\nhello world' | spamassassin -D bayes 1>/dev/null ... dbg: bayes: tie-ing to DB file R/O .../bayes_toks dbg: bayes: tie-ing to DB file R/O .../bayes_seen What you are seeing is characteristic of a failed auto-expire, but you have bayes_auto_expire 0. Are you allowing very large emails to be scanned or learned?