[thelist] PHP Connections and httpd child processes

Greg Strange gstrange at e-tsi.com
Thu Jul 13 10:53:51 CDT 2000


on 7/13/00 10:37 AM, Christopher Ditty at CDitty at email.usps.gov wrote:

> 
> Can anyone tell me if the php3 database connections and includes are
> considered httpd child processes?

This issue probably has more to do with KeepAliveRequests and SpareServers
than with child processes.

> Let me explain....I just opened my new personal
> site(http://www.funhouselotto.com) and am using php3/mysql/apache.
> Well, yest, according to the stats, we had 10 people on the site
> playing during the problem hour.  I looked in the error log file and
> saw an entry talking about maxnum being reached.  I contacted my
> support and they said that this was because my server had reached the
> maximum number of child processes.  I asked them to explain how a site
> that had less than 200 people ALL day and only 10 people that hour,
> can run out of child processes so quickly.  No answer yet.

If they are using Apache, the standard config is to have it set to 100
MaxKeepAliveRequests.  This refers to the amount of requests to allow during
a persistent connection.  0 is an unlimited amount.  In your case you may
want to get lower, thereby killing spareservers quicker and causing a
refresh of MaxAliveRequests.

What was the actual consequence of the error?  Were people getting locked
out?  If so, this has to do with the MaxClients setting on the webserver.

Things to look at are the total number of spareservers that are created and
what the maximum allowed are.  Default is MinSpareServers 5 and
MaxSpareServers 10.  This may not be enough for your site.

Also, if you have your web server set up as an inetd-run server then every
child process is killed as soon as the request is made.  Though this is less
efficient than standalone method of web serving, it may be necessary in your
case so that you may keep low numbers of spareservers available.  If you are
in standalone mode, the only thing that I know of that you can do is
increase MaxKeepAliveRequests, increase MaxSpareServers and Lower your
KeepAliveTimeout.

Hope that helps.

Greg Strange





More information about the thelist mailing list