/[Apache-SVN]
ViewVC logotype

Revision 1892587


Jump to revision: Previous Next
Author: ylavic
Date: Tue Aug 24 22:22:40 2021 UTC (2 years, 7 months ago)
Changed paths: 5
Log Message:
mpm_{event,worker,prefork}: late stop of children processes on restart.

Change how the main process handles restarts, from:
    0. <restart signal>
    1. stop old generation of children processes (graceful or not)
    2. reload new configuration
    3. start new generation of children processes
to:
    0. <restart signal>
    1. reload new configuration
    2. stop old generation of children processes (graceful or not)
    3. start new generation of children processes

The delay between stop and start is now very short and does not depend on the
reload time (which can be quite long with many vhosts and/or complex setups
with regexps or whatever third party components to compile).

Also, while reloading, the old generation of children processes keeps accepting
and handling incoming connections until the new generation is up to take over.

* os/unix/unixd.c (sig_term, sig_restart):
  Set AP_MPMQ_STOPPING only once.

* server/listen.c (ap_duplicate_listeners):
  Use ap_log_error() the main server instead of ap_log_perror().

* server/mpm/{event,worker,prefork}/{event,worker,prefork}.c
    ({event,worker,prefork}_retained_data):
  Save the generation pool pointer (gen_pool) and all the buckets here, they
  won't be cleared before the reload like pconf so they need a persitent
  storage accross restarts (i.e. retained->gen_pool).

* server/mpm/{event,worker,prefork}/{event,worker,prefork}.c
    (perform_idle_server_maintenance, child_main, make_child):
  Change usage of all_buckets (previously with global/static scope) to the new
  retained->buckets array.

Github: closes #198


Changed paths

Path Details
Directoryhttpd/httpd/trunk/os/unix/unixd.c modified , text changed
Directoryhttpd/httpd/trunk/server/listen.c modified , text changed
Directoryhttpd/httpd/trunk/server/mpm/event/event.c modified , text changed
Directoryhttpd/httpd/trunk/server/mpm/prefork/prefork.c modified , text changed
Directoryhttpd/httpd/trunk/server/mpm/worker/worker.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26