From 9850da24aa09173f5183678695d1e910f2a96bcc Mon Sep 17 00:00:00 2001 From: Joshua Slive Date: Wed, 13 Nov 2002 21:12:39 +0000 Subject: [PATCH] Add a little bit of content about the "-k" method of signaling apache and change the apachectl examples to use that. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97506 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/stopping.html.en | 82 +++++++++++++++++---------------- docs/manual/stopping.xml | 87 ++++++++++++++++++++---------------- 2 files changed, 92 insertions(+), 77 deletions(-) diff --git a/docs/manual/stopping.html.en b/docs/manual/stopping.html.en index 4569227aa8..4668a64e7c 100644 --- a/docs/manual/stopping.html.en +++ b/docs/manual/stopping.html.en @@ -6,57 +6,63 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->Stopping and Restarting - Apache HTTP Server
<-
Apache > HTTP Server > Documentation > Version 2.0

Stopping and Restarting

This document covers stopping and restarting Apache on - Unix-like systems. Windows users should see Signalling Apache when + Unix-like systems. Windows users should see Signaling Apache when running.

-
top

Introduction

- -

You will notice many httpd executables running on - your system, but you should not send signals to any of them except - the parent, whose pid is in the PidFile. That is to say you shouldn't ever - need to send signals to any process except the parent. There are - three signals that you can send the parent: TERM, - HUP, and USR1, which will be described - in a moment.

+
top

Introduction

+ +

In order to stop or restart Apache, you must send a signal to + the running httpd processes. There are two ways to + send the signals. First, you can use the unix kill + command to directly send signals to the processes. You will + notice many httpd executables running on your system, + but you should not send signals to any of them except the parent, + whose pid is in the PidFile. That is to say you + shouldn't ever need to send signals to any process except the + parent. There are three signals that you can send the parent: + TERM, HUP, and USR1, which + will be described in a moment.

To send a signal to the parent you should issue a command such as:

-

kill -TERM `cat /usr/local/apache/logs/httpd.pid`

+

kill -TERM `cat /usr/local/apache2/logs/httpd.pid`

-

You can read about its progress by issuing:

+

The second method of signaling the httpd processes + is to use the -k command line options: stop, restart, + and graceful, as described below. These are arguments to the httpd binary, but we recommend that + you send them using the apachectl control script, which + will pass them through to httpd.

-

tail -f /usr/local/apache/logs/error_log

+

After you have signaled httpd, you can read about + its progress by issuing:

-

Modify those examples to match your ServerRoot and PidFile settings.

+

tail -f /usr/local/apache2/logs/error_log

-

A shell script called apachectl is provided which - automates the processing of signalling Apache. For details - about this script, see the documentation on starting Apache.

+

Modify those examples to match your ServerRoot and PidFile settings.

top

Stop Now

Signal: TERM
-
apachectl stop
+
apachectl -k stop
-

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.

+

Sending the TERM or stop 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.

top

Graceful Restart

Signal: USR1
-
apachectl graceful
+
apachectl -k graceful
-

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.

+

The USR1 or graceful 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.

On certain platforms that do not allow USR1 to be used for a graceful restart, an alternative signal may be used (such as @@ -118,14 +124,14 @@
top

Restart Now

Signal: HUP
-
apachectl restart
+
apachectl -k restart
-

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.

+

Sending the HUP or restart 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 mod_status will notice that the server statistics are set to zero when a diff --git a/docs/manual/stopping.xml b/docs/manual/stopping.xml index 264728c9f7..89a0b6e1a1 100644 --- a/docs/manual/stopping.xml +++ b/docs/manual/stopping.xml @@ -9,68 +9,77 @@

This document covers stopping and restarting Apache on Unix-like systems. Windows users should see Signalling Apache when + href="platform/windows.html#signal">Signaling Apache when running.

+httpd +apachectl +
Introduction -

You will notice many httpd executables running on - your system, but you should not send signals to any of them except - the parent, whose pid is in the PidFile. That is to say you shouldn't ever - need to send signals to any process except the parent. There are - three signals that you can send the parent: TERM, - HUP, and USR1, which will be described - in a moment.

+

In order to stop or restart Apache, you must send a signal to + the running httpd processes. There are two ways to + send the signals. First, you can use the unix kill + command to directly send signals to the processes. You will + notice many httpd executables running on your system, + but you should not send signals to any of them except the parent, + whose pid is in the PidFile. That is to say you + shouldn't ever need to send signals to any process except the + parent. There are three signals that you can send the parent: + TERM, HUP, and USR1, which + will be described in a moment.

To send a signal to the parent you should issue a command such as:

-kill -TERM `cat /usr/local/apache/logs/httpd.pid` +kill -TERM `cat /usr/local/apache2/logs/httpd.pid` + +

The second method of signaling the httpd processes + is to use the -k command line options: stop, restart, + and graceful, as described below. These are arguments to the httpd binary, but we recommend that + you send them using the apachectl control script, which + will pass them through to httpd.

-

You can read about its progress by issuing:

+

After you have signaled httpd, you can read about + its progress by issuing:

-tail -f /usr/local/apache/logs/error_log +tail -f /usr/local/apache2/logs/error_log

Modify those examples to match your ServerRoot and PidFile settings.

- -

A shell script called apachectl is provided which - automates the processing of signalling Apache. For details - about this script, see the documentation on starting Apache.

Stop Now
Signal: TERM
-
apachectl stop
+
apachectl -k stop
-

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.

+

Sending the TERM or stop 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.

Graceful Restart
Signal: USR1
-
apachectl graceful
+
apachectl -k graceful
-

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.

+

The USR1 or graceful 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.

On certain platforms that do not allow USR1 to be used for a graceful restart, an alternative signal may be used (such as @@ -136,14 +145,14 @@
Restart Now
Signal: HUP
-
apachectl restart
+
apachectl -k restart
-

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.

+

Sending the HUP or restart 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 mod_status will notice that the server statistics are set to zero when a -- 2.40.0