You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Ralf Naegele <sp...@she.net> on 2004/02/25 13:17:05 UTC
spamd eats my memory
Hello,
I'm running SA in a combination of "sendmail -> smtp-vilter -> spamd" some
weeks with almost no problems. But today spamd killed my machine with 1 GB
of Memory. spamd really ate all memory including the swap space so I had to
cold reboot the machine. First I ran spamd with the parameter -m10 but now
I reduced it to -m5 since I thought this could help. But the load is still
very high (between 2 and 19). Does anybody have a hint how to reduce the
memory usage on a high load mail server? Another idea was to exclude
completely some mails from spam checking, since I get a lot of status
reports by mail, which have no need for spam checking, but I haven't found
a hint for some according options? I tried "trusted_networks",
"whitelist_to" and "whitelist_from" as parameters in the local.cf but as far
as I could see in the logfiles, the SA will anyhow invoked.
Another idea of mine was to reduce the maximum message size (option -s of
spamc). But I haven't a glue how spamd invokes spamc so I can set this
option?
Any help would be nice.
Regards,
Ralf
Re: spamd eats my memory
Posted by Frank DeChellis DSL <fr...@iaw.on.ca>.
we had to setup a separate server to run the spam filter. it was killing
our machine as well. I tyink you're going to find most mail servers have
spamd running on another system.
Frank
On Wed, 25 Feb 2004, Ralf Naegele wrote:
> Date: Wed, 25 Feb 2004 13:17:05 +0100 (CET)
> From: Ralf Naegele <sp...@she.net>
> To: spamassassin-users@incubator.apache.org
> Subject: spamd eats my memory
>
> Hello,
>
> I'm running SA in a combination of "sendmail -> smtp-vilter -> spamd" some
> weeks with almost no problems. But today spamd killed my machine with 1 GB
> of Memory. spamd really ate all memory including the swap space so I had to
> cold reboot the machine. First I ran spamd with the parameter -m10 but now
> I reduced it to -m5 since I thought this could help. But the load is still
> very high (between 2 and 19). Does anybody have a hint how to reduce the
> memory usage on a high load mail server? Another idea was to exclude
> completely some mails from spam checking, since I get a lot of status
> reports by mail, which have no need for spam checking, but I haven't found
> a hint for some according options? I tried "trusted_networks",
> "whitelist_to" and "whitelist_from" as parameters in the local.cf but as far
> as I could see in the logfiles, the SA will anyhow invoked.
> Another idea of mine was to reduce the maximum message size (option -s of
> spamc). But I haven't a glue how spamd invokes spamc so I can set this
> option?
>
> Any help would be nice.
>
> Regards,
> Ralf
>
-----------------------------------------------------------------------
Frank DeChellis
Internet Access Worldwide
3 East Main Street Welland, Ontario, Canada L3B 3W4
905-714-1400 fax 905-732-0524
www.iaw.com
----------------------------------------------------------------------
Re: spamd eats my memory
Posted by Kai Schaetzl <ma...@conactive.com>.
Ralf Naegele wrote on Wed, 25 Feb 2004 13:17:05 +0100 (CET):
> But today spamd killed my machine with 1 GB
> of Memory.
>
Are you talking about *one* spamd process eating that much memory? I have
seen this with another milter. It's a bug in spamd with certain, probably
ill-formed messages (the message got possibly "mangled" by the milter). If
it gets fed one of these it starts eating memory until the machine
crashes.
Kai
--
Kai Sch�tzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com
IE-Center: http://ie5.de & http://msie.winware.org
Re: spamd eats my memory
Posted by Ralf Naegele <sp...@she.net>.
On Wed, 25 Feb 2004, Jason Philbrook shaped the electrons to say:
> I invoke spamc from procmail. /etc/procmailrc checks for .procmailrc in
> the user's home directory before it runs spamc. In such a case, you could
> have your status reports directed into your mailbox (or a seperate
> mailbox) via procmail before it gets to spamc.
>
> DROPPRIVS=yes
> :0fw
> * < 128000
> | spamc
>
> This limits spamc to process only messages under 128000 bytes in size. I
> wouldn't want to bog spamc/spamd on monster files. You could convert to
> using procmail like this. Procmail might have snubbed once in a while for
> not being as efficient as a milter/vilter style thing, but it's very
> flexible and convenient.
>
I can't process the mails via procmail for my mail server since
it's a relay mail gateway with no local users. But your hint with limiting
the scanned file size could be helpful. The man page of spamc lists the
parameter "-c" for restricting the file size. But how can I use this
parameter, when I use spamd?
Regards,
Ralf
Re: spamd eats my memory
Posted by Ralf Naegele <sp...@she.net>.
On Wed, 25 Feb 2004, Pete Henshall shaped the electrons to say:
>
> try -m 5 not -m5
>
> My server, 2 gig ram dual 1.4 gigs never drops below about 1 load average
>
> Regards
> Pete
sorry this was a typo :-| I call spamd in the following way:
/usr/bin/spamd -d -c -m5 -H -u spamass -r /var/run/spamd.pid
Regards,
Ralf
Re: spamd eats my memory
Posted by Dan Melomedman <da...@devonit.com>.
Ralf Naegele wrote:
> Hello,
>
> I'm running SA in a combination of "sendmail -> smtp-vilter -> spamd" some
> weeks with almost no problems. But today spamd killed my machine with 1 GB
> of Memory. spamd really ate all memory including the swap space so I had to
You shouldn't let your services eat all memory. Use 'softlimit' tool
from daemontools, or your shell's 'ulimit' in the shell script which
runs the service.
--
We come to love not by finding a perfect person
but by learning to see an imperfect person perfectly.
-Sam Keen
Re: spamd eats my memory
Posted by Jason Philbrook <jp...@saucer.midcoast.com>.
I invoke spamc from procmail. /etc/procmailrc checks for .procmailrc in
the user's home directory before it runs spamc. In such a case, you could
have your status reports directed into your mailbox (or a seperate
mailbox) via procmail before it gets to spamc.
DROPPRIVS=yes
:0fw
* < 128000
| spamc
This limits spamc to process only messages under 128000 bytes in size. I
wouldn't want to bog spamc/spamd on monster files. You could convert to
using procmail like this. Procmail might have snubbed once in a while for
not being as efficient as a milter/vilter style thing, but it's very
flexible and convenient.
I use spamd/spamc on athlon 2600xp / linux 2.6.x / postfix / procmail /
1GB ram systems that process 100-170k messags per day per machine. I also
have a cron job that restarts spamd a couple times a day whether it needs
it or not just for good measure in case there were a memory leak or other
problem.
On Wed, Feb 25, 2004 at 01:17:05PM +0100, Ralf Naegele wrote:
> Hello,
>
> I'm running SA in a combination of "sendmail -> smtp-vilter -> spamd" some
> weeks with almost no problems. But today spamd killed my machine with 1 GB
> of Memory. spamd really ate all memory including the swap space so I had to
> cold reboot the machine. First I ran spamd with the parameter -m10 but now
> I reduced it to -m5 since I thought this could help. But the load is still
> very high (between 2 and 19). Does anybody have a hint how to reduce the
> memory usage on a high load mail server? Another idea was to exclude
> completely some mails from spam checking, since I get a lot of status
> reports by mail, which have no need for spam checking, but I haven't found
> a hint for some according options? I tried "trusted_networks",
> "whitelist_to" and "whitelist_from" as parameters in the local.cf but as far
> as I could see in the logfiles, the SA will anyhow invoked.
> Another idea of mine was to reduce the maximum message size (option -s of
> spamc). But I haven't a glue how spamd invokes spamc so I can set this
> option?
>
> Any help would be nice.
>
> Regards,
> Ralf
--
/*
Jason Philbrook | Midcoast Internet Solutions - Internet Access,
KB1IOJ | Hosting, and TCP-IP Networks for Midcoast Maine
http://f64.nu/ | http://www.midcoast.com/
*/