-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Vanilla Apache with "mpm_event" functions in the following way after a "graceful" restart:
- Old child processes which serve no requests are terminated immediately.
- Old child processes which have threads busy with existing requests are left alive. The busy threads continue to work until the requests are completed. The idle threads are terminated immediately.
This is an efficient way to handle "graceful" restarts because we can increase the ServerLimit a lot, in order to accommodate lots of old child processes (finishing a few old connections), and have a couple of up-to-date active child processes (with lots of threads waiting to serve new clients).
The old child processes allocate very few memory resources because most of their threads are terminated.
Unfortunately, mod_http2 doesn't honor the "graceful" restart. None of the following settings made any difference during my tests:
H2MinWorkers 1(additionally, I figured out that this isn't honored at all because a lot of H2 threads are always created, even for an idle Apache server which just started)H2MaxWorkerIdleSeconds 5(the idle H2 thread live forever regardless of this setting combined withH2MinWorkers 1)
The old Apache child processes keep all their H2 threads active forever, regardless of the fact that most of those H2 threads are idle. I will appreciate it if you can look into this.