[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vps-mail] Question



On Mon, Sep 15, 2003 at 10:08:23PM -0700, Abigail Marshall wrote:
> On a VPS1, FreeBSD, vinstall - what sort of database is
> Bayes running?

It's a Berkeley DB hash. The bayes_seen is a db of message id tags for
keeping track of which messages have already been processed.
bayes_toks is a db of tokens found; it keeps track of how many in a
packed int of some kind.

> I've had some odd database problems and have been advised
> that I should be using the "DB_File" module and also to make
> sure that I was using an up-to-date version, as "certain
> older versions of the Berkeley DB had file locking issues on
> some platforms."

The DB_File that comes with your VPS should be adequate. When did you
begin to get locking problems?

> It certainly looks like I am getting file locking issues
> which corrupt the database. I upgraded my server to a VPS C,
> and things got worse - I see more spam slipping through but
> also a lot of error messages like this:
> 
>   Cannot open bayes_path /.spamassassin/bayes R/W: File exists
> 
> SA and Bayes are still working for some messages, just
> running into these apparent lock file issues more often.

You may want to try serializing your pipe through spamassassin if
you're not already:

    :0 fw: spamassassin.lock
    |/usr/local/bin/spamassassin

which will only allow one message at a time through SA. I know this
isn't the optimal setting for throughput, but it's a debugging
technique you can use to see where the problem may lie. If things work
after doing this, then you're definitely getting contention in the DB
and the SA locking mechanism is not adequate. I noticed an interesting
comment in the SA code:

  if ($main->{learn_wait_for_lock}) {
    $tout = 300;        # TODO: Dan to write better lock code
  } else {
    $tout = 10;
  }

Right after this chunk is one of two possible places your error might
be occuring. Apparently it's a known issue (we call that a tell-tale
comment) and may be fixed in the next stable release. Cross your
fingers.

Scott
-- 
Scott Wiersdorf
scottw@xxxxxxxxxxxx
======================================================================
Technical questions regarding this list may be sent to
<vps-mail-owner@xxxxxxxxxxxx>. You may request an automated help
response by sending an email with the word 'help' (w/o quotes) in the
BODY of the message (subject is ignored) to <vps-mail-request@xxxxxxxxxxxx>.
======================================================================


Main Index | Thread Index
Match: Format: Sort by:
Search: