|
Apache HTTP Server Version 1.3Stopping and Restarting ApacheYou will notice many To send a signal to the parent you should issue a command such as: kill -TERM `cat /usr/local/apache/logs/httpd.pid`You can read about its progress by issuing: tail -f /usr/local/apache/logs/error_logModify those examples to match your ServerRoot and PidFile settings. As of Apache 1.3 we provide a script TERM Signal: stop nowSending the HUP Signal: restart nowSending the Users of the
status module
will notice that the server statistics are
set to zero when a 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 restartNote: prior to release 1.2b9 this code is quite unstable and shouldn't be used at all. The 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. Users of the
status module
will notice that the server statistics
are not set to zero when a The status module will also use a At present there is no way for a log rotation script using
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. In the case of graceful restarts it will also leave children running when it exits. (These are the children which are "gracefully exiting" by handling their last request.) This will cause problems if you attempt to restart the server -- it will not be able to bind to its listening ports. At present the only work around is to check the syntax of your files before doing a restart. The easiest way is to just run httpd as a non-root user. If there are no errors it will attempt to open its sockets and logs and fail because it's not root (or because the currently running httpd already has those ports bound). If it fails for any other reason then it's probably a config file error and the error should be fixed before issuing the graceful restart. Appendix: signals and race conditionsPrior to Apache 1.2b9 there were several race conditions involving the restart and die signals (a simple description of race condition is: a time-sensitive problem, as in if something happens at just the wrong time it won't behave as expected). For those architectures that have the "right" feature set we have eliminated as many as we can. But it should be noted that there still do exist race conditions on certain architectures. Architectures that use an on disk
ScoreBoardFile
have the potential to corrupt their scoreboards. This can result in
the "bind: Address already in use" (after
All architectures have a small race condition in each child involving the second and subsequent requests on a persistent HTTP connection (KeepAlive). It may exit after reading the request line but before reading any of the request headers. There is a fix that was discovered too late to make 1.2. In theory this isn't an issue because the KeepAlive client has to expect these events because of network latencies and server timeouts. In practice it doesn't seem to affect anything either -- in a test case the server was restarted twenty times per second and clients successfully browsed the site without getting broken images or empty documents. Apache HTTP Server Version 1.3 |
|||||||||||||||||
With any suggestions or questions please feel free to contact us |