You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ryan Bloom <rb...@raleigh.ibm.com> on 1999/02/11 23:02:33 UTC

Signals for Apache-apr.

We have run head-long into an annoying issue for Apache-apr.  On Linux
(2.0), SIGUSR1 and SIGUSR2 are used by pthreads.  Apache is currently
using SIGUSR1 for graceful restarts.  Obviously, this is a bad thing if
Linux sends it at times we aren't expecting it.  Does anybody have any
opinions for which signals we should use to by-pass this issue.

We have a few options.

SIGALRM    ---   This shouldn't really be used in Apache-apr, so it is
		 available.
SIGWINCH   ---   Used when you re-size a window	 for a terminal based
 		 program.  There is next to no way we will actually need
		 this for something else in Apache.

Any other thoughts/opinions.

Ryan

	

_______________________________________________________________________
Ryan Bloom		rbb@raleigh.ibm.com
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	


Re: Signals for Apache-apr.

Posted by Tony Finch <do...@dotat.at>.
Manoj Kasichainula <ma...@io.com> wrote:
>
>[On using SIGWINCH for graceful restart in a threaded Apache]
>
>The other problem that seems concerning is that SIGWINCH might not be
>available on all platforms. If this is the case, and if we still want
>to support graceful restart on Linux 2.0, we may eventually need
>different graceful restart signals for the differenct systems.  Yuck.

Squid uses a vast number of signals (well, 7) to control the running
daemon and because of the linuxthreads USR1 & USR2 thing it uses
different signals on different platforms or with different
configuration options. It's made usable because the program has a -k
option to send a "rotate" or "shutdown" etc. signal to the running
daemon. Perhaps Apache should do something similar?

Tony.
-- 
f.a.n.finch  dot@dotat.at  fanf@demon.net

Re: Signals for Apache-apr.

Posted by Dean Gaudet <dg...@arctic.org>.

On Wed, 17 Feb 1999, Manoj Kasichainula wrote:

> The other problem that seems concerning is that SIGWINCH might not be
> available on all platforms. If this is the case, and if we still want
> to support graceful restart on Linux 2.0, we may eventually need
> different graceful restart signals for the differenct systems.  Yuck.

You could get rid of non-graceful restart... we always wanted to do that. 
The largest problem is the log rolling problem.  In a threaded server
that's not much of an issue. 

Dean


Re: Signals for Apache-apr.

Posted by Manoj Kasichainula <ma...@io.com>.
[On using SIGWINCH for graceful restart in a threaded Apache]
On Tue, Feb 16, 1999 at 02:21:36PM +0100, Martin Kraemer wrote:
> This will trigger extra restarts if you really DO resize the xterm you started
> the server from (at least in the "httpd -X &" case -- I hope the fact that the
> server detaches itself from the tty in the usual case does also make it immune
> against these signals?).

Window resize doesn't seem to affect the detached httpd. Signal
handling seems to still be broken in -X mode, so the tests don't tell
us much.

The other problem that seems concerning is that SIGWINCH might not be
available on all platforms. If this is the case, and if we still want
to support graceful restart on Linux 2.0, we may eventually need
different graceful restart signals for the differenct systems.  Yuck.

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/
"Never offend people with style when you can offend them with substance."
  -- Sam Brown, "The Washington Post", January 26, 1977

Re: Signals for Apache-apr.

Posted by Martin Kraemer <ma...@mch.sni.de>.
On Thu, Feb 11, 1999 at 05:02:33PM -0500, Ryan Bloom wrote:
> SIGWINCH   ---   Used when you re-size a window	 for a terminal based
>  		 program.  There is next to no way we will actually need
> 		 this for something else in Apache.

This will trigger extra restarts if you really DO resize the xterm you started
the server from (at least in the "httpd -X &" case -- I hope the fact that the
server detaches itself from the tty in the usual case does also make it immune
against these signals?).

    Martin
-- 
<Ma...@MchP.Siemens.De>      |        Siemens Information and
Phone: +49-89-636-46021               |        Communication  Products
FAX:   +49-89-636-47816               |        81730  Munich,  Germany

Re: Signals for Apache-apr.

Posted by Rasmus Lerdorf <ra...@lerdorf.on.ca>.
> SIGALRM    ---   This shouldn't really be used in Apache-apr, so it is
> 		 available.

It would be extremely nice if SIGALRM could be opened up for modules to
use.  I am currently using SIGPROF in the PHP module in order to get a
script timeout feature.  It's not a real-time timeout, but rather a cpu
time timeout which is generally ok since it is mostly to kill off scripts
that have gone into infinite loops.

-Rasmus