httpd.conf

David Mandala plug-discuss@lists.PLUG.phoenix.az.us
Fri, 30 Nov 2001 15:55:36 -0700


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C179F2.1FB49760
Content-Type: text/plain;
	charset="iso-8859-1"

The Redhat scripts send, either TERM or HUP both of which attempt to kill
all child process "RIGHT NOW" which means that connections in progress will
be dropped hard, folks at the far end will get very odd results and timeouts
and whatnot. TERM kills apache NOW and exits, HUP kills all child processes
NOW and rereads the config files and continues.

By sending the USR1 signal each child will finish handling the customer so
to speak and then die before another come in. This could take as much as 10
minutes or more for every old apache process to die and be changed to the
new one. Therefore no customers see any bad things. Now if there is a need
to kill the server quickly then TERM and/or HUP is the correct call to use.

The information below is directly copied from the Apache
http://httpd.apache.org/docs/stopping.html manual page and clearly explains
it all:

TERM Signal: stop now

Sending the TERM signal to the parent causes it to immediately attempt to
kill off all of its children. It may take it several seconds to complete
killing off its children. Then the parent itself exits. Any requests in
progress are terminated, and no further requests are served.
HUP Signal: restart now

Sending the HUP signal to the parent causes it to kill off its children like
in TERM but the parent doesn't exit. It re-reads its configuration files,
and re-opens any log files. Then it spawns a new set of children and
continues serving hits.

Users of the status module will notice that the server statistics are set to
zero when a HUP is sent.

Note: If your configuration file has errors in it when you issue a restart
then your parent will not restart, it will exit with an error. See below for
a method of avoiding this.
USR1 Signal: graceful restart

Note: prior to release 1.2b9 this code is quite unstable and shouldn't be
used at all.

The USR1 signal causes the parent process to advise the children to exit
after their current request (or to exit immediately if they're not serving
anything). The parent re-reads its configuration files and re-opens its log
files. As each child dies off the parent replaces it with a child from the
new generation of the configuration, which begins serving new requests
immediately.

This code is designed to always respect the MaxClients, MinSpareServers, and
MaxSpareServers settings. Furthermore, it respects StartServers in the
following manner: if after one second at least StartServers new children
have not been created, then create enough to pick up the slack. This is to
say that the code tries to maintain both the number of children appropriate
for the current load on the server, and respect your wishes with the
StartServers parameter.



-----Original Message-----
From: Patrick Hustis [mailto:phustis@teltrax.com]
Sent: Friday, November 30, 2001 3:11 PM
To: plug-discuss@lists.PLUG.phoenix.az.us
Subject: RE: httpd.conf



More for my own curiosity than anything else, but anyway...

That is the script that handles stopping the daemon upon shutdown, and
starting up upon system boot, so why does it not handle it correctly when
called with 'restart' which simply executes the start & stop functions of
the script?

Patrick


At 02:44 PM 11/30/01 -0700, you wrote:


This is a bad answer, Redhat does not restart Apache correctly, it will
indeed restart the Server but it will stop and start it which is ungraceful
at best.

> -----Original Message----- 
> From: Lisa Winkler [mailto:lmw@po.cwru.edu] 
> Sent: Friday, November 30, 2001 2:33 PM 
> To: plug-discuss@lists.PLUG.phoenix.az.us 
> Subject: Re: httpd.conf 
> 
> 
> /etc/rc.d/init.d/httpd restart 
> 
> On Fri, 30 Nov 2001, Charlie Bullen wrote: 
> 
> > I was setting up several virtual domains on a RedHat server 
> running apache 1.3.12 . I know there must be a way to get the 
> server to re read the httpd.conf file after I add a domain, 
> but I haven't a clue. I have been rebooting the server which 
> is just so un cool. Any suggestions? 
> > 
> > Thanks 
> > 
> > Charlie 
> > 
> 
> ________________________________________________ 
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your 
> mail doesn't post to the list quickly and you use Netscape to 
> write mail. 
> 
> PLUG-discuss mailing list  -  PLUG-discuss@lists.PLUG.phoenix.az.us 
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss 
> 


------------------------------------------------------------
Patrick Hustis                         
TelTrax Corporation
Vice President  Information Systems
phustis@teltrax.com
480-481-9292
------------------------------------------------------------ 

------_=_NextPart_001_01C179F2.1FB49760
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: httpd.conf</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>The Redhat scripts send, either TERM or HUP both of =
which attempt to kill all child process &quot;RIGHT NOW&quot; which =
means that connections in progress will be dropped hard, folks at the =
far end will get very odd results and timeouts and whatnot. TERM kills =
apache NOW and exits, HUP kills all child processes NOW and rereads the =
config files and continues.</FONT></P>

<P><FONT SIZE=3D2>By sending the USR1 signal each child will finish =
handling the customer so to speak and then die before another come in. =
This could take as much as 10 minutes or more for every old apache =
process to die and be changed to the new one. Therefore no customers =
see any bad things. Now if there is a need to kill the server quickly =
then TERM and/or HUP is the correct call to use.</FONT></P>

<P><FONT SIZE=3D2>The information below is directly copied from the =
Apache <A HREF=3D"http://httpd.apache.org/docs/stopping.html" =
TARGET=3D"_blank">http://httpd.apache.org/docs/stopping.html</A> manual =
page and clearly explains it all:</FONT></P>

<P><FONT SIZE=3D2>TERM Signal: stop now</FONT>
</P>

<P><FONT SIZE=3D2>Sending the TERM signal to the parent causes it to =
immediately attempt to kill off all of its children. It may take it =
several seconds to complete killing off its children. Then the parent =
itself exits. Any requests in progress are terminated, and no further =
requests are served.</FONT></P>

<P><FONT SIZE=3D2>HUP Signal: restart now</FONT>
</P>

<P><FONT SIZE=3D2>Sending the HUP signal to the parent causes it to =
kill off its children like in TERM but the parent doesn't exit. It =
re-reads its configuration files, and re-opens any log files. Then it =
spawns a new set of children and continues serving hits.</FONT></P>

<P><FONT SIZE=3D2>Users of the status module will notice that the =
server statistics are set to zero when a HUP is sent.</FONT>
</P>

<P><FONT SIZE=3D2>Note: If your configuration file has errors in it =
when you issue a restart then your parent will not restart, it will =
exit with an error. See below for a method of avoiding this.</FONT></P>

<P><FONT SIZE=3D2>USR1 Signal: graceful restart</FONT>
</P>

<P><FONT SIZE=3D2>Note: prior to release 1.2b9 this code is quite =
unstable and shouldn't be used at all.</FONT>
</P>

<P><FONT SIZE=3D2>The USR1 signal causes the parent process to advise =
the children to exit after their current request (or to exit =
immediately if they're not serving anything). The parent re-reads its =
configuration files and re-opens its log files. As each child dies off =
the parent replaces it with a child from the new generation of the =
configuration, which begins serving new requests =
immediately.</FONT></P>

<P><FONT SIZE=3D2>This code is designed to always respect the =
MaxClients, MinSpareServers, and MaxSpareServers settings. Furthermore, =
it respects StartServers in the following manner: if after one second =
at least StartServers new children have not been created, then create =
enough to pick up the slack. This is to say that the code tries to =
maintain both the number of children appropriate for the current load =
on the server, and respect your wishes with the StartServers =
parameter.</FONT></P>
<BR>
<BR>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Patrick Hustis [<A =
HREF=3D"mailto:phustis@teltrax.com">mailto:phustis@teltrax.com</A>]</FON=
T>
<BR><FONT SIZE=3D2>Sent: Friday, November 30, 2001 3:11 PM</FONT>
<BR><FONT SIZE=3D2>To: plug-discuss@lists.PLUG.phoenix.az.us</FONT>
<BR><FONT SIZE=3D2>Subject: RE: httpd.conf</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>More for my own curiosity than anything else, but =
anyway...</FONT>
</P>

<P><FONT SIZE=3D2>That is the script that handles stopping the daemon =
upon shutdown, and starting up upon system boot, so why does it not =
handle it correctly when called with 'restart' which simply executes =
the start &amp; stop functions of the script?</FONT></P>

<P><FONT SIZE=3D2>Patrick</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>At 02:44 PM 11/30/01 -0700, you wrote:</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>This is a bad answer, Redhat does not restart Apache =
correctly, it will indeed restart the Server but it will stop and start =
it which is ungraceful at best.</FONT></P>

<P><FONT SIZE=3D2>&gt; -----Original Message----- </FONT>
<BR><FONT SIZE=3D2>&gt; From: Lisa Winkler [<A =
HREF=3D"mailto:lmw@po.cwru.edu">mailto:lmw@po.cwru.edu</A>] </FONT>
<BR><FONT SIZE=3D2>&gt; Sent: Friday, November 30, 2001 2:33 PM </FONT>
<BR><FONT SIZE=3D2>&gt; To: plug-discuss@lists.PLUG.phoenix.az.us =
</FONT>
<BR><FONT SIZE=3D2>&gt; Subject: Re: httpd.conf </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; /etc/rc.d/init.d/httpd restart </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; On Fri, 30 Nov 2001, Charlie Bullen wrote: =
</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; I was setting up several virtual domains =
on a RedHat server </FONT>
<BR><FONT SIZE=3D2>&gt; running apache 1.3.12 . I know there must be a =
way to get the </FONT>
<BR><FONT SIZE=3D2>&gt; server to re read the httpd.conf file after I =
add a domain, </FONT>
<BR><FONT SIZE=3D2>&gt; but I haven't a clue. I have been rebooting the =
server which </FONT>
<BR><FONT SIZE=3D2>&gt; is just so un cool. Any suggestions? </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Thanks </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Charlie </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; =
________________________________________________ </FONT>
<BR><FONT SIZE=3D2>&gt; See <A =
HREF=3D"http://PLUG.phoenix.az.us/navigator-mail.shtml" =
TARGET=3D"_blank">http://PLUG.phoenix.az.us/navigator-mail.shtml</A> if =
your </FONT>
<BR><FONT SIZE=3D2>&gt; mail doesn't post to the list quickly and you =
use Netscape to </FONT>
<BR><FONT SIZE=3D2>&gt; write mail. </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; PLUG-discuss mailing list&nbsp; -&nbsp; =
PLUG-discuss@lists.PLUG.phoenix.az.us </FONT>
<BR><FONT SIZE=3D2>&gt; <A =
HREF=3D"http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss" =
TARGET=3D"_blank">http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-=
discuss</A> </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
</P>
<BR>

<P><FONT =
SIZE=3D2>------------------------------------------------------------</F=
ONT>
<BR><FONT SIZE=3D2>Patrick =
Hustis&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; </FONT>
<BR><FONT SIZE=3D2>TelTrax Corporation</FONT>
<BR><FONT SIZE=3D2>Vice President&nbsp; Information Systems</FONT>
<BR><FONT SIZE=3D2>phustis@teltrax.com</FONT>
<BR><FONT SIZE=3D2>480-481-9292</FONT>
<BR><FONT =
SIZE=3D2>------------------------------------------------------------ =
</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C179F2.1FB49760--