diff options
author | Greg Ames <gregames@apache.org> | 2006-04-13 19:53:04 +0200 |
---|---|---|
committer | Greg Ames <gregames@apache.org> | 2006-04-13 19:53:04 +0200 |
commit | 801bb0266a2b01d672916e5cb6d04006f373f711 (patch) | |
tree | 017e9bb203ca01fa3c8fc7755fbea3fdb3d7f2c4 /server/mpm/worker | |
parent | If we don't have a prototype for crypt() we shouldn't (diff) | |
download | apache2-801bb0266a2b01d672916e5cb6d04006f373f711.tar.xz apache2-801bb0266a2b01d672916e5cb6d04006f373f711.zip |
MaxClients isn't the only reason the scoreboard can fill up. another
reason should be fixed soon.
also add a comment to explain an obscure line of code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@393868 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/mpm/worker')
-rw-r--r-- | server/mpm/worker/worker.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index faf9747e2e..8d64860d95 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -1397,6 +1397,9 @@ static void perform_idle_server_maintenance(void) int all_dead_threads = 1; if (i >= ap_max_daemons_limit && totally_free_length == idle_spawn_rate) + /* short cut if all active processes have been examined and + * enough empty scoreboard slots have been found + */ break; ps = &ap_scoreboard_image->parent[i]; for (j = 0; j < ap_threads_per_child; j++) { @@ -1488,15 +1491,23 @@ static void perform_idle_server_maintenance(void) } else if (idle_thread_count < min_spare_threads) { /* terminate the free list */ - if (free_length == 0) { + if (free_length == 0) { /* scoreboard is full, can't fork */ /* only report this condition once */ static int reported = 0; if (!reported) { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, - ap_server_conf, - "server reached MaxClients setting, consider" - " raising the MaxClients setting"); + if (active_thread_count >= + ap_daemons_limit * ap_threads_per_child) { + ap_log_error(APLOG_MARK, APLOG_ERR, 0, + ap_server_conf, + "server reached MaxClients setting, consider" + " raising the MaxClients setting"); + } + else { + ap_log_error(APLOG_MARK, APLOG_ERR, 0, + ap_server_conf, + "scoreboard is full, not at MaxClients"); + } reported = 1; } idle_spawn_rate = 1; |