You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Marco Herrn <ml...@mherrn.de> on 2005/05/11 11:51:56 UTC

spamd - limiting processes

Hi, I am using spamassassin 3.0.2 with spamd. spamd is running all the
time and the spamc processes are called from my MTA (exim) each time a
message comes in and the receipient wants the message to be scanned.

spamd is called with the following options:

--create-prefs --max-children 5 --helper-home-dir
--syslog=/var/log/spamd.log -q --debug -d --pidfile=/var/run/spamd.pid


It seems that the --max-children option doesn't do as one expects, since
spamd now uses a preforking. And it seems that the processes are not
limited at all.
I forwarded around 70 messages to an email address that wants to have its
mails scanned and I had problems with this. Since I am using SQL for
userprefs, awl and bayes each process accesses the database (postgresql).
This DB is limited to 32 concurrent connections.  And those weren't enough
for spamassassin. A lot of those mails couldn't be delivered because of
this.

Now my question is, what to do to limit concurrent spamd processes?

And is it correct behaviour that the spamd processes give up, when the DB
isn't accessible at some time? If they had tried it again, all mails could
have been delivered.


Regards
Marco


Re: spamd - limiting processes

Posted by Marco Herrn <ml...@mherrn.de>.
> At 05:51 AM 5/11/2005, Marco Herrn wrote:
>>It seems that the --max-children option doesn't do as one expects, since
>>spamd now uses a preforking. And it seems that the processes are not
>>limited at all.
>
> Are you sure? Are there more than 5 spamd's in ps ax?

You are right. There are only 5 of them. It seems the other I saw where
many  concurrent spamc processes.

> You mentioned there being more than 32 db connections, I just want to
> check
> if it's really 32 spamd's running, or if there are 5 spamd's running and
> someone's not closing SQL connections.

Hmm, the only process also accessing the database is exim. I do not know
how exim is doing this, what wouldn't think that exim is that inefficient.

I noticed that the database also produces a significant load on my system.
So I will now try to investigate what postgresql is doing here.

Thanks
Marco


Re: spamd - limiting processes

Posted by Matt Kettler <mk...@comcast.net>.
At 05:51 AM 5/11/2005, Marco Herrn wrote:
>It seems that the --max-children option doesn't do as one expects, since
>spamd now uses a preforking. And it seems that the processes are not
>limited at all.

Are you sure? Are there more than 5 spamd's in ps ax?

Really, with the prefork model, 5 should be the hard maximum (as well as 
the minimum most of the time).

You mentioned there being more than 32 db connections, I just want to check 
if it's really 32 spamd's running, or if there are 5 spamd's running and 
someone's not closing SQL connections.