You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Patrick von der Hagen <pa...@wudika.de> on 2005/05/04 19:05:17 UTC

memory-usage going BOOM

Hi all,

I've been using SpamAssassin 3.0.2 for quite some time (about three
month) on my mailservers and so far I didn't notice any problems. Load
and message-throughput have been quite constant.

However, yesterday one of my servers went BANG, due to lack of memory.
First I suspected Bind9, but when the memory dropped low again this
afternoon I found that SpamAssassin consumed an extreme amount of memory.
Right after launching spamd, each child uses about 30MB of memory, but
after some time it they reach 200MB each, some still more.

I don't use AWL. I use Bayes, but deactivating Bayes did not help at
all. I use some DNS-blacklists and some SARE-tests. Other that that,
it's just an ordinary out-of-the-box installation, nothing fancy.

As a kind of workaround I reduced the number of spamd-processes and have
them killed after processing 20 emails. The spamd-processes often reach
60 MB before being killed, some still manage to consume 150 to 220 MB
each. But as that happens rarely my server can still cope.

I suspect that SpamAssassin might not like some messages passed through
it, but currently I don't know how to retrieve a sample.  :-(

Has anybody else seen strange behaviour? Bikrant Neupane has reported a
very similar issue, but I can't find any log-entries refering to "deep
recursion". I'll try to do more debugging soon.
-- 
CU,
    Patrick.

Re: memory-usage going BOOM

Posted by Johann Spies <js...@sun.ac.za>.
On Wed, May 04, 2005 at 07:05:17PM +0200, Patrick von der Hagen wrote:
> Hi all,
> 
> I've been using SpamAssassin 3.0.2 for quite some time (about three
> month) on my mailservers and so far I didn't notice any problems. Load
> and message-throughput have been quite constant.
> 
> However, yesterday one of my servers went BANG, due to lack of memory.
> First I suspected Bind9, but when the memory dropped low again this
> afternoon I found that SpamAssassin consumed an extreme amount of memory.
> Right after launching spamd, each child uses about 30MB of memory, but
> after some time it they reach 200MB each, some still more.

I had the same happening on three different servers.  In my case I had
4Gb of ram on each of them with two 3.2 CPU's on each server.

In the end I started using the following script (as a cron job) which
kills a spamd-child when it grows bigger than 2000000 bytes in memory:

ps flax | grep [s]pamd | \
   awk '{if($7 > 2000000) print "kill " $3}' | /bin/sh

It seems to work.

Regards
Johann
-- 
Johann Spies          Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch

     "Do not repay anyone evil for evil. Be careful to do
      what is right in the eyes of all men."     
                            Romans 12:17 

Re: memory-usage going BOOM

Posted by jdow <jd...@earthlink.net>.
From: <da...@umiacs.umd.edu>

> BTDT, bought the T-shirt. Adding memory will help. Short term solution
> can be adding swap space. Another option can be running SA remotely 
> on another machine (users run spamc -d sa.machine.com)

This might be "A GOOD TIME" for someone to create a small exposition
regarding spamassassin memory usage. I note that it seems to hover
around 56 megabyte to 65 megabyte range even when freshly spawned. I
do not run AWL. I have about 5 megabytes of Bayes data. (I train
lightly of late and only when something new turns up.) I am running
a fair number of SARE rule sets, about 1.3 megabytes worth. How does
this add up to 56 megabytes or more? Does perl take that much space?
Or does its expansion of the rule sets make it so large?

{^_^}


Re: memory-usage going BOOM

Posted by da...@umiacs.umd.edu.
>> I've been using SpamAssassin 3.0.2 for quite some time (about three
>> month) on my mailservers and so far I didn't notice any problems. Load
>> and message-throughput have been quite constant.
>> 
>> However, yesterday one of my servers went BANG, due to lack of memory.
>> First I suspected Bind9, but when the memory dropped low again this
>> afternoon I found that SpamAssassin consumed an extreme amount of memory.
>> Right after launching spamd, each child uses about 30MB of memory, but
>> after some time it they reach 200MB each, some still more.
>> 
>> I don't use AWL. I use Bayes, but deactivating Bayes did not help at
>> all. I use some DNS-blacklists and some SARE-tests. Other that that,
>> it's just an ordinary out-of-the-box installation, nothing fancy.
>> 
>> As a kind of workaround I reduced the number of spamd-processes and have
>> them killed after processing 20 emails. The spamd-processes often reach
>> 60 MB before being killed, some still manage to consume 150 to 220 MB
>> each. But as that happens rarely my server can still cope.
>> 
>> I suspect that SpamAssassin might not like some messages passed through
>> it, but currently I don't know how to retrieve a sample.  :-(
>> 
>> Has anybody else seen strange behaviour? Bikrant Neupane has reported a
>> very similar issue, but I can't find any log-entries refering to "deep
>> recursion". I'll try to do more debugging soon.
>

BTDT, bought the T-shirt. Adding memory will help. Short term solution
can be adding swap space. Another option can be running SA remotely 
on another machine (users run spamc -d sa.machine.com)


  =-=-=-=-=-=-=-=-=-=-  generated by /dev/dave -=-=-=-=-=-=-=-=-=-=-=-=
  David Stern                                    University of Maryland
            Institute for Advanced Computer Studies

Re: memory-usage going BOOM

Posted by "Stephen M. Przepiora" <sm...@ncoastsoft.com>.
I have, and I did the same as you along with dropping in another gig of ram.

Steve

Patrick von der Hagen wrote:

> Hi all,
>
> I've been using SpamAssassin 3.0.2 for quite some time (about three
> month) on my mailservers and so far I didn't notice any problems. Load
> and message-throughput have been quite constant.
>
> However, yesterday one of my servers went BANG, due to lack of memory.
> First I suspected Bind9, but when the memory dropped low again this
> afternoon I found that SpamAssassin consumed an extreme amount of memory.
> Right after launching spamd, each child uses about 30MB of memory, but
> after some time it they reach 200MB each, some still more.
>
> I don't use AWL. I use Bayes, but deactivating Bayes did not help at
> all. I use some DNS-blacklists and some SARE-tests. Other that that,
> it's just an ordinary out-of-the-box installation, nothing fancy.
>
> As a kind of workaround I reduced the number of spamd-processes and have
> them killed after processing 20 emails. The spamd-processes often reach
> 60 MB before being killed, some still manage to consume 150 to 220 MB
> each. But as that happens rarely my server can still cope.
>
> I suspect that SpamAssassin might not like some messages passed through
> it, but currently I don't know how to retrieve a sample.  :-(
>
> Has anybody else seen strange behaviour? Bikrant Neupane has reported a
> very similar issue, but I can't find any log-entries refering to "deep
> recursion". I'll try to do more debugging soon.



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 5/3/2005