You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Gavin Cato <ga...@corp.nexon.com.au> on 2004/11/09 22:56:08 UTC

Spamd going nuts - spawning heaps of children

Hiya,

Got a bit of a problem.

Have this setup ;

Internet --> avmx01 server (Postfix + ClamAV + Amavisd) --> SA server
(Sendmail + SA 3.0.1) --> Remote MTA

The avmx01 server was upgraded to a much more powerful machine 2 days ago. I
don't think that should be causing this problem though.

The SA server is sometimes running out of memory (hitting swap) as the spamd
process is sometimes not enforcing the maximum children setting.

Twice overnight the box was hitting swap so hard it wasn't really doing
anything useful - each time a ;

ps ax | grep spamd | wc -l

Showed well over 200 processes.

It just did it again when I came into work, though this time I caught it
when it was up to 189 processes.

I'm starting it via this ;

/usr/local/bin/spamd --max-children=25 --listen-ip=x.x.x.x
--allowed-ips=y.y.y.y,z.z.z.z -d -u nobody

It is called via spamass-milter.

The server is running FreeBSD 4.9 with 2.5gb RAM with 2 x 1.1ghz P3's & 10k
RPM SCSI.

Any ideas on what I can look for? After restarting spamd everything runs
perfect, as I wrote this it is sticking to 26 spamd processes (normal) and
it is holding it to that. But it won't stay that away forever based on last
night.

At the moment I'll probably put something in cron to kill and restart spamd
every couple of hours.

Gav




















Re: Spamd going nuts - spawning heaps of children

Posted by jplesset <ja...@dp-design.com>.
Gavin, do you have any limitations set in your startup to limit the 
number of children, or how many messages each one processes?  If not, 
why don't you try to set a reasonable max?

jay

Gavin Cato wrote:

> Hi Jay,
>
> Thanks for the note. Unfortunately this box I'm managing is handling a 
> significant amount of mail each day.
>
> Every now and again the spamd processes just start increasing - and 
> over time as more processes are running the box will eventually run 
> out of ram (2.5gb) and start biting into the 4gb of swap. That's when 
> the box is useless :)
>
> It does appear to be stable though with a script in cron killing off 
> the spamd processes and then restarting them. Not ideal though :)
>
> Gav
>
>
>
>
> On 12/11/04 3:18 AM, "jplesset" <ja...@dp-design.com> wrote:
>
>     Yeah, I see this, too,
>
>     3.0.1.  Solaris.  iPlanet Messaging Server, using spamd.
>
>     I don't process a lot of mail, as I only have 5 users that accept
>     mail from the internet, and it's a small machine.
>
>     I use the startup line for spamd like this:
>
>     spamd -d --max-children=2 --max-conn-per-child=3
>
>     Per the documentation, this should get me 3 processes.  I run an
>     average of 10 to 12 spamd processes at any one time, but it seems
>     stable at this level.  They do recycle, and I've had no problems
>     since setting these restrictions.  system has been up a week or
>     more, with no problems.
>
>     jay
>
>     Gavin Cato wrote:
>
>
>         Anyone? :(
>
>
>
>         On 10/11/04 8:56 AM, "Gavin Cato"
>         <ga...@corp.nexon.com.au>
>         <ma...@corp.nexon.com.au>  wrote:
>
>           
>          
>
>
>             Hiya,
>
>             Got a bit of a problem.
>
>             Have this setup ;
>
>             Internet --> avmx01 server (Postfix + ClamAV + Amavisd)
>             --> SA server
>             (Sendmail + SA 3.0.1) --> Remote MTA
>
>             The avmx01 server was upgraded to a much more powerful
>             machine 2 days ago. I
>             don't think that should be causing this problem though.
>
>             The SA server is sometimes running out of memory (hitting
>             swap) as the spamd
>             process is sometimes not enforcing the maximum children
>             setting.
>
>             Twice overnight the box was hitting swap so hard it wasn't
>             really doing
>             anything useful - each time a ;
>
>             ps ax | grep spamd | wc -l
>
>             Showed well over 200 processes.
>
>             It just did it again when I came into work, though this
>             time I caught it
>             when it was up to 189 processes.
>
>             I'm starting it via this ;
>
>             /usr/local/bin/spamd --max-children=25 --listen-ip=x.x.x.x
>             --allowed-ips=y.y.y.y,z.z.z.z -d -u nobody
>
>             It is called via spamass-milter.
>
>             The server is running FreeBSD 4.9 with 2.5gb RAM with 2 x
>             1.1ghz P3's & 10k
>             RPM SCSI.
>
>             Any ideas on what I can look for? After restarting spamd
>             everything runs
>             perfect, as I wrote this it is sticking to 26 spamd
>             processes (normal) and
>             it is holding it to that. But it won't stay that away
>             forever based on last
>             night.
>
>             At the moment I'll probably put something in cron to kill
>             and restart spamd
>             every couple of hours.
>
>             Gav
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>                 
>              
>
>
>
>
>           
>
>
>

Re: Spamd going nuts - spawning heaps of children

Posted by Gavin Cato <ga...@corp.nexon.com.au>.
Hi Jay,

Thanks for the note. Unfortunately this box I¹m managing is handling a
significant amount of mail each day.

Every now and again the spamd processes just start increasing ­ and over
time as more processes are running the box will eventually run out of ram
(2.5gb) and start biting into the 4gb of swap. That¹s when the box is
useless :)

It does appear to be stable though with a script in cron killing off the
spamd processes and then restarting them. Not ideal though :)

Gav




On 12/11/04 3:18 AM, "jplesset" <ja...@dp-design.com> wrote:

> Yeah, I see this, too,
> 
> 3.0.1.  Solaris.  iPlanet Messaging Server, using spamd.
> 
> I don't process a lot of mail, as I only have 5 users that accept mail from
> the internet, and it's a small machine.
> 
> I use the startup line for spamd like this:
> 
> spamd -d --max-children=2 --max-conn-per-child=3
> 
> Per the documentation, this should get me 3 processes.  I run an average of 10
> to 12 spamd processes at any one time, but it seems stable at this level.
> They do recycle, and I've had no problems since setting these restrictions.
> system has been up a week or more, with no problems.
> 
> jay
> 
> Gavin Cato wrote:
>>  
>> Anyone? :(
>> 
>> 
>> 
>> On 10/11/04 8:56 AM, "Gavin Cato" <ga...@corp.nexon.com.au>
>> <ma...@corp.nexon.com.au>  wrote:
>> 
>>   
>>  
>>>  
>>> Hiya,
>>> 
>>> Got a bit of a problem.
>>> 
>>> Have this setup ;
>>> 
>>> Internet --> avmx01 server (Postfix + ClamAV + Amavisd) --> SA server
>>> (Sendmail + SA 3.0.1) --> Remote MTA
>>> 
>>> The avmx01 server was upgraded to a much more powerful machine 2 days ago. I
>>> don't think that should be causing this problem though.
>>> 
>>> The SA server is sometimes running out of memory (hitting swap) as the spamd
>>> process is sometimes not enforcing the maximum children setting.
>>> 
>>> Twice overnight the box was hitting swap so hard it wasn't really doing
>>> anything useful - each time a ;
>>> 
>>> ps ax | grep spamd | wc -l
>>> 
>>> Showed well over 200 processes.
>>> 
>>> It just did it again when I came into work, though this time I caught it
>>> when it was up to 189 processes.
>>> 
>>> I'm starting it via this ;
>>> 
>>> /usr/local/bin/spamd --max-children=25 --listen-ip=x.x.x.x
>>> --allowed-ips=y.y.y.y,z.z.z.z -d -u nobody
>>> 
>>> It is called via spamass-milter.
>>> 
>>> The server is running FreeBSD 4.9 with 2.5gb RAM with 2 x 1.1ghz P3's & 10k
>>> RPM SCSI.
>>> 
>>> Any ideas on what I can look for? After restarting spamd everything runs
>>> perfect, as I wrote this it is sticking to 26 spamd processes (normal) and
>>> it is holding it to that. But it won't stay that away forever based on last
>>> night.
>>> 
>>> At the moment I'll probably put something in cron to kill and restart spamd
>>> every couple of hours.
>>> 
>>> Gav
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>     
>>>  
>>  
>> 
>> 
>>   
> 



Re: Spamd going nuts - spawning heaps of children

Posted by jplesset <ja...@dp-design.com>.
Yeah, I see this, too,

3.0.1.  Solaris.  iPlanet Messaging Server, using spamd.

I don't process a lot of mail, as I only have 5 users that accept mail 
from the internet, and it's a small machine.

I use the startup line for spamd like this:

spamd -d --max-children=2 --max-conn-per-child=3

Per the documentation, this should get me 3 processes.  I run an average 
of 10 to 12 spamd processes at any one time, but it seems stable at this 
level.  They do recycle, and I've had no problems since setting these 
restrictions.  system has been up a week or more, with no problems.

jay

Gavin Cato wrote:

>Anyone? :(
>
>
>
>On 10/11/04 8:56 AM, "Gavin Cato" <ga...@corp.nexon.com.au> wrote:
>
>  
>
>>Hiya,
>>
>>Got a bit of a problem.
>>
>>Have this setup ;
>>
>>Internet --> avmx01 server (Postfix + ClamAV + Amavisd) --> SA server
>>(Sendmail + SA 3.0.1) --> Remote MTA
>>
>>The avmx01 server was upgraded to a much more powerful machine 2 days ago. I
>>don't think that should be causing this problem though.
>>
>>The SA server is sometimes running out of memory (hitting swap) as the spamd
>>process is sometimes not enforcing the maximum children setting.
>>
>>Twice overnight the box was hitting swap so hard it wasn't really doing
>>anything useful - each time a ;
>>
>>ps ax | grep spamd | wc -l
>>
>>Showed well over 200 processes.
>>
>>It just did it again when I came into work, though this time I caught it
>>when it was up to 189 processes.
>>
>>I'm starting it via this ;
>>
>>/usr/local/bin/spamd --max-children=25 --listen-ip=x.x.x.x
>>--allowed-ips=y.y.y.y,z.z.z.z -d -u nobody
>>
>>It is called via spamass-milter.
>>
>>The server is running FreeBSD 4.9 with 2.5gb RAM with 2 x 1.1ghz P3's & 10k
>>RPM SCSI.
>>
>>Any ideas on what I can look for? After restarting spamd everything runs
>>perfect, as I wrote this it is sticking to 26 spamd processes (normal) and
>>it is holding it to that. But it won't stay that away forever based on last
>>night.
>>
>>At the moment I'll probably put something in cron to kill and restart spamd
>>every couple of hours.
>>
>>Gav
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>    
>>
>
>
>  
>

Re: Spamd going nuts - spawning heaps of children

Posted by Gavin Cato <ga...@corp.nexon.com.au>.
Anyone? :(



On 10/11/04 8:56 AM, "Gavin Cato" <ga...@corp.nexon.com.au> wrote:

> Hiya,
> 
> Got a bit of a problem.
> 
> Have this setup ;
> 
> Internet --> avmx01 server (Postfix + ClamAV + Amavisd) --> SA server
> (Sendmail + SA 3.0.1) --> Remote MTA
> 
> The avmx01 server was upgraded to a much more powerful machine 2 days ago. I
> don't think that should be causing this problem though.
> 
> The SA server is sometimes running out of memory (hitting swap) as the spamd
> process is sometimes not enforcing the maximum children setting.
> 
> Twice overnight the box was hitting swap so hard it wasn't really doing
> anything useful - each time a ;
> 
> ps ax | grep spamd | wc -l
> 
> Showed well over 200 processes.
> 
> It just did it again when I came into work, though this time I caught it
> when it was up to 189 processes.
> 
> I'm starting it via this ;
> 
> /usr/local/bin/spamd --max-children=25 --listen-ip=x.x.x.x
> --allowed-ips=y.y.y.y,z.z.z.z -d -u nobody
> 
> It is called via spamass-milter.
> 
> The server is running FreeBSD 4.9 with 2.5gb RAM with 2 x 1.1ghz P3's & 10k
> RPM SCSI.
> 
> Any ideas on what I can look for? After restarting spamd everything runs
> perfect, as I wrote this it is sticking to 26 spamd processes (normal) and
> it is holding it to that. But it won't stay that away forever based on last
> night.
> 
> At the moment I'll probably put something in cron to kill and restart spamd
> every couple of hours.
> 
> Gav
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>