summaryrefslogtreecommitdiffstats
path: root/debian/patches/child_processes_fail_to_start.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:01:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:01:31 +0000
commitc9cf025fadfe043f0f2f679e10d1207d8a158bb6 (patch)
tree3a94effe0bdc0a6814d8134f4ed840d7cc6b6f19 /debian/patches/child_processes_fail_to_start.patch
parentAdding upstream version 2.4.57. (diff)
downloadapache2-c9cf025fadfe043f0f2f679e10d1207d8a158bb6.tar.xz
apache2-c9cf025fadfe043f0f2f679e10d1207d8a158bb6.zip
Adding debian version 2.4.57-2.debian/2.4.57-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/child_processes_fail_to_start.patch')
-rw-r--r--debian/patches/child_processes_fail_to_start.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/debian/patches/child_processes_fail_to_start.patch b/debian/patches/child_processes_fail_to_start.patch
new file mode 100644
index 0000000..957c857
--- /dev/null
+++ b/debian/patches/child_processes_fail_to_start.patch
@@ -0,0 +1,75 @@
+Description: Add upstream patch to fix active daemon accounting
+Author: Ondřej Surý <ondrej@sury.org>
+Forwarded: not-needed
+Reviewed-By: Yadd <yadd@debian.org>
+Last-Update: 2022-03-14
+
+--- a/server/mpm/event/event.c
++++ b/server/mpm/event/event.c
+@@ -1864,11 +1864,9 @@
+ else if (connections_above_limit(&workers_were_busy)) {
+ disable_listensocks();
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
+- "Too many open connections (%u), "
++ "Too many open connections (%u, %u idlers), "
+ "not accepting new conns in this process",
+- apr_atomic_read32(&connection_count));
+- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, ap_server_conf,
+- "Idle workers: %u",
++ apr_atomic_read32(&connection_count),
+ ap_queue_info_num_idlers(worker_queue_info));
+ }
+ else if (!listener_may_exit) {
+@@ -2173,6 +2171,12 @@
+ }
+ }
+
++#if 0
++ if (is_idle) {
++ ap_queue_info_unset_idle(worker_queue_info);
++ }
++#endif
++
+ ap_update_child_status_from_indexes(process_slot, thread_slot,
+ dying ? SERVER_DEAD
+ : SERVER_GRACEFUL, NULL);
+@@ -2817,6 +2821,12 @@
+ int i, j;
+
+ for (i = 0; i < server_limit; ++i) {
++ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
++ "perform_idle_server_maintenance(%i/%i): "
++ "slot %i/%i, free %i/%i",
++ child_bucket, num_buckets,
++ i, retained->max_daemons_limit,
++ free_length, retained->idle_spawn_rate[child_bucket]);
+ if (num_buckets > 1 && (i % num_buckets) != child_bucket) {
+ /* We only care about child_bucket in this call */
+ continue;
+@@ -2832,6 +2842,13 @@
+ ps = &ap_scoreboard_image->parent[i];
+ if (ps->pid != 0) {
+ int child_threads_active = 0;
++ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
++ "perform_idle_server_maintenance(%i/%i): "
++ "slot %i/%i, pid %i, quiescing %i, daemons %i/%i",
++ child_bucket, num_buckets,
++ i, retained->max_daemons_limit,
++ (int)ps->pid, ps->quiescing,
++ retained->active_daemons, retained->total_daemons);
+ if (ps->quiescing == 1) {
+ ps->quiescing = 2;
+ retained->active_daemons--;
+@@ -3069,6 +3086,12 @@
+
+ event_note_child_killed(child_slot, 0, 0);
+ ps = &ap_scoreboard_image->parent[child_slot];
++ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
++ "server_main_loop(): "
++ "slot %i/%i, pid %i, quiescing %i, daemons %i/%i",
++ child_slot, retained->max_daemons_limit,
++ (int)ps->pid, ps->quiescing,
++ retained->active_daemons, retained->total_daemons);
+ if (ps->quiescing != 2)
+ retained->active_daemons--;
+ ps->quiescing = 0;