You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Justin Erenkrantz <je...@ebuilt.com> on 2001/07/13 23:38:54 UTC

Re: cvs commit: apr/locks/unix crossproc.c

On Fri, Jul 13, 2001 at 01:59:36PM -0400, Greg Ames wrote:
> jerenkrantz@apache.org wrote:
> > 
> >     BTW, the threaded MPM isn't starting up enough child
> >   processes (only 1).  StartServers is 3 - is the count of 3 supposed to
> >   include the parent and the unixd child?  
> 
> no, StartServers and the other process related directives don't include
> the parent or our friends the OtherChildren (including unixd).  Last
> time I tried it, threaded was starting exactly what I asked for
> initially, then very quickly perform_idle_server_maintenance was killing
> off processes to get down to the MaxThreads limit.  If I did a ps
> quickly enough, I could see defunct processes.  Could that be what's
> happening for you?

Yeah, that reasoning looks correct upon review of my httpd.conf.
StartServers is set to 3, MaxSpareThreads is set to 10 and
ThreadsPerChild is 25.  Therefore, it'll start three processes and
then immediately kill two of them off.

So, can we make the default httpd.conf a little more sane?

Either do:

StartServers = 1

or

MaxSpareThreads = StartServers * ThreadsPerChild

I'd probably prefer to see StartServers = 1.  Patch inline.  -- justin

Index: httpd-std.conf
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/conf/httpd-std.conf,v
retrieving revision 1.33
diff -u -r1.33 httpd-std.conf
--- httpd-std.conf	2001/07/05 01:23:00	1.33
+++ httpd-std.conf	2001/07/13 21:38:18
@@ -128,7 +128,7 @@
 # ThreadsPerChild ...... constant number of worker threads in each server process
 # MaxRequestsPerChild .. maximum  number of requests a server process serves
 <IfModule threaded.c>
-StartServers         3
+StartServers         1
 MaxClients           8
 MinSpareThreads      5
 MaxSpareThreads     10