-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Randy McAnally wrote:
> Since upgrading to SA 3.2.4, process-quarantine.pl has
locked up twice,
> consuming 99.9% CPU and causing the server to slow to a
snails pace. I have
> to manually kill off the spinning process before it
continues. Both times
> it's happened while processing large queues (around
2000 spam/ham) about an
> hour or two into it.
>
> I checked process-quarantine logs and theres nothing of
interest...just a
> complaint every hour that another process-quarantine
process is running
> until I kill it off.
That complaint message isn't telling you that you need to
take any
action, it's just telling you that it tried to start a
second instance
of the process-quarantine script and then aborted. There
shouldn't be
anything to "kill off" in that scenario, since the
initial process
should be writing a lockfile that prevents other instances
from running
until the first one finishes. In other words, if you have
process-quarantine running hourly and the job takes more
than an hour,
you should see a notice in the logs to the effect of,
"I tried to start
on schedule, but there was another process running, so I
aborted." No
manual intervention on your part is necessary in that
situation, you
shouldn't have to "kill off" anything--the new
process should have
aborted itself when it saw the existing lockfile.
On a very busy site, in fact, it's possible for
process-quarantine to
run almost continuously, because at the end of every
process-quarantine
run it checks to see if there are any new items waiting to
be
processed--items that were confirmed/reported since the last
run
started. Only when there are no more items left to process
will the
script terminate. As such, it's safe to run the script on
an hourly
schedule, even if it takes more than an hour to run--the
lockfiles
prevent concurrency problems.
As for what's eating up all of your CPU during those runs,
my guess
would be that some of those mail items happen to be quite
large, and
that you're trying to process too many of them in each pass.
In your
/etc/maia.conf file, try reducing the $default_limit setting
to
something small, e.g. 5 items per pass (and certainly
nothing larger
than 20). The effect this has is to cause the
process-quarantine script
to purge its memory buffers after a small number of items
have been
processed, so that perl doesn't continue to allocate new
memory ad
infinitum. Perl's garbage-collection leaves a lot to be
desired, so if
you've got thousands of items to process you're better off
doing so in
small batches rather than big ones.
Another setting you'll want to tweak in /etc/maia.conf is
the
$default_max_size setting, which should match the
$sa_mail_body_size_limit you set in /etc/amavisd.conf. This
will
prevent process-quarantine from trying to process items
larger than a
certain size, so that you don't end up wasting a lot of
extra cycles
churning through the guts of a 350 MB AVI file or something
looking for
usable Bayes tokens. The default setting of 256 kB should
be fine; not
much spam is larger than that these days, so you won't miss
out on many
useful tokens by skipping larger items.
- --
Robert LeBlanc <rjl renaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHzsw8GmqOER2NHewRAsJKAJ43lGY91/xz34AmhjuDnTgDyK9dBACd
GzLv
fLH5k0BoWr5Jdn6/XVFudG0=
=YPRo
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-users renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
|