Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'httpd.conf (prefork)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
httpd.conf (prefork)
Authored by: jonas_jonas on Nov 21, '05 10:17:37AM

if you need the apache webserver only für local development, you don't need all these apache processes.

running apache on unix, apache creates a few processes to serve the content. usually one as root and a few (about ten) as nobody or http or something like that.

you may change these values in the httpd.conf (for apache 1.3): http://httpd.apache.org/docs/1.3/mod/core.html#maxclients

these are a few line of my httpd.conf for apache2. i have running apache two times. one for php4 and one for php5, so i don't want to have to much useless processes:


# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers         1
MinSpareServers      1
MaxSpareServers      3
MaxClients          50
MaxRequestsPerChild  0
</IfModule>


[ Reply to This | # ]
httpd.conf (prefork)
Authored by: CrazyJack on Nov 22, '05 01:23:20PM

If you're worried about memory leaks, then simply set the "MaxRequestsPerChild" to a low value. 1000 or 10000 or so. After this many requests the process will always terminate and a new one is started.



[ Reply to This | # ]