https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6304

--- Comment #5 from Kevin A. McGrail <[email protected]> 2010-01-25 10:58:58 
UTC ---
Created an attachment (id=4657)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4657)
patch for spamd adjustments to info level + small fix to Makefile.PL

Mark,

I looked at bug 6127 and see the changes you are referring to:

@@ -2419,8 +2420,9 @@
     }

     unless
($Mail::SpamAssassin::Logger::LOG_SA{INHIBIT_LOGGING_IN_SIGCHLD_HANDLER}) {
-      info("spamd: handled cleanup of child pid $pid ".
-                ((defined $sig) ? "due to SIG$sig" : ""));
+      info("spamd: handled cleanup of child pid [%s]%s: %s",
+           $pid, (defined $sig ? " due to SIG$sig" : ""),
+           exit_status_str($child_stat,0));


A review of my older logs does show I was seeing the older format cleanup
handling sans the extra exit status.  So I think we have answered the question
of where the more dire messages are coming from in 3.3.0

HOWEVER, this issue does appear to point out that spamd is spawning and killing
children too often.  So I switched to checking if that was a bug or my
installation.

Since my command line did NOT specify a max-spare, I think from my review that
setting min-spare to 5 was a mistake.   

I've changed to min-spare to the default of 1 and increased the max-spare
making the relevant options now:

--min-spare=1 --min-children=5 --max-spare=10 --max-children=40

And the scary messages are now decreased greatly and the process that are
started are running a scan before being killed.  So I think the scary message
is indicative of poor choice of spamd parameters.

The attached patch adds adjustments to info level rather than just debug.  I
also found a bug in make distclean that left two raw conversions behind so
there is a fix in the Makefile.PL for that minor issue.

What I think is ALSO needed is also a patch to the error messages, the spamd
POD or a README explaining that if you are seeing processes started and killed
too often, you may need to tweak your spamd parameters.

For me, monitoring with the command 'tail /var/log/maillog -f | grep -i
prefork' appears to show that I've now done a much better job picking the
parameters.

For example, now I see the server getting busy, no idles available, spamd
children spawned, the spawned children are used and then killed more properly:

Jan 25 13:56:23 talonjr spamd[28135]: prefork: child states: IBBIIIIIII 
Jan 25 13:56:27 talonjr spamd[28135]: prefork: child states: IBBBBBBBII 
Jan 25 13:56:27 talonjr spamd[28135]: prefork: child states: IBBIBBBBII 
Jan 25 13:56:27 talonjr spamd[28135]: prefork: child states: IBBIBBBIII 
Jan 25 13:56:28 talonjr spamd[28135]: prefork: child states: BBBBIBBIII 
Jan 25 13:56:29 talonjr spamd[28135]: prefork: child states: BBBBIBBBBB 
Jan 25 13:56:29 talonjr spamd[28135]: prefork: child states: BBBBBIBBBB 
Jan 25 13:56:29 talonjr spamd[28135]: prefork: child states: BBBBBIIBBB 
Jan 25 13:56:31 talonjr spamd[28135]: prefork: child states: BBBBBBBBBB 
Jan 25 13:56:31 talonjr spamd[28135]: prefork: adjust: 0 idle children less
than 1 minimum idle children. Increasing spamd children: 28353 started. 
Jan 25 13:56:31 talonjr spamd[28135]: prefork: child states: BBBBBBBBBBB 
Jan 25 13:56:31 talonjr spamd[28135]: prefork: adjust: 0 idle children less
than 1 minimum idle children. Increasing spamd children: 28354 started. 
Jan 25 13:56:31 talonjr spamd[28135]: prefork: child states: BBBBBBBBBBBI 
Jan 25 13:56:31 talonjr spamd[28135]: prefork: child states: IBBBBBBBBBBI 
Jan 25 13:56:32 talonjr spamd[28135]: prefork: child states: BBBBBBBBBBBB 
Jan 25 13:56:32 talonjr spamd[28135]: prefork: adjust: 0 idle children less
than 1 minimum idle children. Increasing spamd children: 28355 started. 
Jan 25 13:56:32 talonjr spamd[28135]: prefork: child states: BBBBBBBBBBBBB 
Jan 25 13:56:32 talonjr spamd[28135]: prefork: adjust: 0 idle children less
than 1 minimum idle children. Increasing spamd children: 28356 started. 
Jan 25 13:56:32 talonjr spamd[28135]: prefork: child states: BBBBBBBBBBBBBI 
Jan 25 13:56:32 talonjr spamd[28135]: prefork: child states: BBBBBBBIBBBBBI 
Jan 25 13:56:32 talonjr spamd[28135]: prefork: child states: BBBBBBBBBIBBBI 
Jan 25 13:56:33 talonjr spamd[28135]: prefork: child states: BBBBIBBBBBBBBI 
Jan 25 13:56:34 talonjr spamd[28135]: prefork: child states: BBBBIIBBBBBBBI 
Jan 25 13:56:34 talonjr spamd[28135]: prefork: child states: BBBBIIIBBBBBBI 
Jan 25 13:56:35 talonjr spamd[28135]: prefork: child states: BBBBIIIBBBIBBI 
Jan 25 13:56:35 talonjr spamd[28135]: prefork: child states: IBBBIIIBBBIBBI 
Jan 25 13:56:35 talonjr spamd[28135]: prefork: child states: IBBBIIIBBBIIBI 
Jan 25 13:56:36 talonjr spamd[28135]: prefork: child states: BBBBIIIBIBIIBI 
Jan 25 13:56:36 talonjr spamd[28135]: prefork: child states: BBBBIIIBIBIIII 
Jan 25 13:56:36 talonjr spamd[28135]: prefork: child states: BBBIIIIBIBIIII 
Jan 25 13:56:36 talonjr spamd[28135]: prefork: child states: BBBIIIIIIBIIII 
Jan 25 13:56:37 talonjr spamd[28135]: prefork: child states: BIBIIIIIIBIIII 
Jan 25 13:56:37 talonjr spamd[28135]: prefork: adjust: 11 idle children more
than 10 maximum idle children. Decreasing spamd children: 28356 killed. 
Jan 25 13:56:37 talonjr spamd[28135]: prefork: child states: BIBIIIIIIBIII 
Jan 25 13:56:37 talonjr spamd[28135]: prefork: child states: IIBIIIIIIBIII 
Jan 25 13:56:37 talonjr spamd[28135]: prefork: adjust: 11 idle children more
than 10 maximum idle children. Decreasing spamd children: 28355 killed. 
Jan 25 13:56:37 talonjr spamd[28135]: prefork: child states: IIBIIIIIIBII 
Jan 25 13:56:37 talonjr spamd[28135]: prefork: child states: IIBIIIIIIIII 
Jan 25 13:56:37 talonjr spamd[28135]: prefork: adjust: 11 idle children more
than 10 maximum idle children. Decreasing spamd children: 28354 killed. 
Jan 25 13:56:37 talonjr spamd[28135]: prefork: child states: IIBIIIIIIII 
Jan 25 13:56:39 talonjr spamd[28135]: prefork: child states: IIBIIIIIIII 
Jan 25 13:56:45 talonjr spamd[28135]: prefork: child states: BBBIIIIIIII 
Jan 25 13:56:46 talonjr spamd[28135]: prefork: child states: IBBIIIIIIII 
Jan 25 13:56:46 talonjr spamd[28135]: prefork: child states: IBBIIIIIIII

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to