]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mworker: block reloads
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Wed, 9 Oct 2024 17:23:41 +0000 (19:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Oct 2024 20:02:39 +0000 (22:02 +0200)
commit5f164530825111219ae79b87df047808e36f4830
tree50d00ed21bdeee0a74b16e7556116da8d9a05e58
parent5be14b338a837ee32ff951dbbd50fcabf7c7cae2
MEDIUM: mworker: block reloads

When reloads arrive very often (sent by some APIs), newly forked workers
almost don't have a time to load completely and to send its READY status to
master, which allows then to stop the previous worker (launched before reload).
As a result, the number of workers increases very quickly, previous workers are
still alive and the memory consumption is very high.

To avoid such situations let's return in cli_parse_reload() reload status 0
with the text ""Another reload is still in progress", if there is still a
process with PROC_O_INIT flag in the processes list.
src/mworker.c