ap_mpm_podx_signal(pod[child_bucket], AP_MPM_PODX_GRACEFUL);
retained->idle_spawn_rate[child_bucket] = 1;
}
- else if (idle_thread_count < min_spare_threads) {
+ else if (idle_thread_count < min_spare_threads / num_buckets) {
/* terminate the free list */
if (free_length == 0) { /* scoreboard is full, can't fork */
restart_pending = shutdown_pending = 0;
set_signals();
+
/* Don't thrash... */
+ if (min_spare_threads < threads_per_child * num_buckets)
+ min_spare_threads = threads_per_child * num_buckets;
if (max_spare_threads < min_spare_threads + threads_per_child * num_buckets)
max_spare_threads = min_spare_threads + threads_per_child * num_buckets;
}
enable_default_listener = 1;
-
ap_duplicate_listeners(ap_server_conf, pconf, num_buckets);
pod = apr_palloc(pconf, sizeof(ap_pod_t *) * num_buckets);
ap_mpm_podx_signal(pod[child_bucket], AP_MPM_PODX_GRACEFUL);
retained->idle_spawn_rate[child_bucket] = 1;
}
- else if (idle_thread_count < min_spare_threads) {
+ else if (idle_thread_count < min_spare_threads / num_buckets) {
/* terminate the free list */
if (free_length == 0) { /* scoreboard is full, can't fork */
restart_pending = shutdown_pending = 0;
set_signals();
+
/* Don't thrash... */
+ if (min_spare_threads < threads_per_child * num_buckets)
+ min_spare_threads = threads_per_child * num_buckets;
if (max_spare_threads < min_spare_threads + threads_per_child * num_buckets)
max_spare_threads = min_spare_threads + threads_per_child * num_buckets;
}
enable_default_listener = 0;
-
if ((num_listensocks = ap_setup_listeners(ap_server_conf)) < 1) {
ap_log_error(APLOG_MARK, APLOG_ALERT | level_flags, 0,
(startup ? NULL : s),
ap_mpm_podx_signal(pod[child_bucket], AP_MPM_PODX_GRACEFUL);
retained->idle_spawn_rate[child_bucket] = 1;
}
- else if (idle_thread_count < min_spare_threads) {
+ else if (idle_thread_count < min_spare_threads / num_buckets) {
/* terminate the free list */
if (free_length == 0) { /* scoreboard is full, can't fork */
restart_pending = shutdown_pending = 0;
set_signals();
+
/* Don't thrash... */
+ if (min_spare_threads < threads_per_child * num_buckets)
+ min_spare_threads = threads_per_child * num_buckets;
if (max_spare_threads < min_spare_threads + threads_per_child * num_buckets)
max_spare_threads = min_spare_threads + threads_per_child * num_buckets;