Re: [exim] SMTP processing hangs during bayes sync

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Chris Lightfoot
Date:  
À: Bodo Gelbe
CC: exim-users
Sujet: Re: [exim] SMTP processing hangs during bayes sync
On Thu, Aug 31, 2006 at 02:53:21PM +0200, Bodo Gelbe wrote:
> I've the following problem with exim and exiscan:
>
> Exim calls spamd in the DATA ACL (for messages from
> external hosts).
>
> spamassassin/spamd is configured with
>
> bayes_auto_learn 1
> bayes_journal_max_size 0
> bayes_auto_expire 0
> bayes_learn_to_journal 1
>
> >From time to time (cronjob) the database and the journal are
> synchronized (sa-learn --sync). During the synchronization
> process SMTP requests are hanging for 20 to 50 seconds (even
> those from local hosts, which will not be scanned by spamd).
> Number of exim processes are increasing.
>
> Looks like something is locked within exim before spamd
> is called, which locks out processing for messages not
> undergoing spamd processing.
>
> Any idea how to avoid the delay (dont't want a transport
> because we're doing greylisting based upon the spam level)?


what Bayes DB back-end are you using for SA? If you are
using the default GDBM one then (a) it has to acquire an
exclusive lock to write the database; and (b) it's plenty
slow anyway.

If so, suggested workarounds include: use another backend;
build the new database on a tmpfs and atomically replace
the old one (because GDBM writes everything with O_SYNC
it's *vastly* quicker on a tmpfs than a real fs); consider
applying the below patch or one like it:
    http://caesious.beasts.org/~chris/tmp/20060901/gdbm-1.8.3-mappedio2.patch
or don't use SA's Bayes functionality at all, but use
another similar program -- as long as it makes use of the
tokens SA writes into the mail it should work just as
well,


--
``I dissect fruit fly heads for a living.
How hard can kneecapping a mouse be?''
(pest-control solutions, as seen on the internet)