You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Oliver Wulff <ol...@zurich.ch> on 2002/10/16 11:57:35 UTC

Process Creation, MaxRequestsPerChild, destroy child process

Hi all

We are using Apache 1.3.26 on Solaris.
As I understood, an Apache child process will die after processing a number
of request (defined in MaxRequestsPerChild directive). If there isn't a lot
of traffic the processes won't die. Is that right?

We had already about 180 child processes running. I'm sure that there were
never 180 concurrent users. So, I was looking for the mechanism how Apache
handles the creation of child processes.

If my assumption above is correct, I'm wondering if there isn't a timeout
for a child process. If a child process didn't process a request since a
minute it will be killed. This will go on till only the minimum number
(MinSpareServers) of child processes are running. So, unused resources get
freed.

Any feedback is appreciated.

Regards
Oliver Wulff







******************* BITTE BEACHTEN *******************
Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
Ausschluss jeder Reproduktion zu zerstören und die absendende Person
umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.



Re: Process Creation, MaxRequestsPerChild, destroy child process

Posted by Aaron Bannert <aa...@clove.org>.
On Wed, Oct 16, 2002 at 11:57:35AM +0200, Oliver Wulff wrote:
> We are using Apache 1.3.26 on Solaris.
> As I understood, an Apache child process will die after processing a number
> of request (defined in MaxRequestsPerChild directive). If there isn't a lot
> of traffic the processes won't die. Is that right?

That is correct.

> We had already about 180 child processes running. I'm sure that there were
> never 180 concurrent users. So, I was looking for the mechanism how Apache
> handles the creation of child processes.

Creation and destruction of children are controlled by the MinSpareServers
and MaxSpareServers directives. For example, if you have MinSpareServers
set to 10, and you find at one point that you have 180 children, then
that means that the server encountered 175 simultaneous client connections
(since it kept at least 5 servers spare at a minimum).

> If my assumption above is correct, I'm wondering if there isn't a timeout
> for a child process. If a child process didn't process a request since a
> minute it will be killed. This will go on till only the minimum number
> (MinSpareServers) of child processes are running. So, unused resources get
> freed.

The timeout is inherent in the MaxSpareServers directive. If you have
MaxSpareServers set to 10, and the server after some amount of time (it's
not instantaneous, or you'd have too much turnover of child processes),
then the server will start killing off children until it comes back
within range.

Viele Gruesse,
-aaron