httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject [PATCH] Re: New error_log format (fwd)
Date Wed, 22 Oct 1997 16:55:37 GMT
On Wed, 22 Oct 1997, Marc Slemko wrote:

> I could agree that this shouldn't perhaps be an error and perhaps it 
> should be set to more than 4; perhaps some % of currently running servers?

It shouldn't be an error, it's just FYI.  I thought I had bumped it from 4
to 8 already ... 4 is too low regardless because that's what a navigator
will spawn at the same time.  I can't decide on a good percentage of the
currently running servers -- because this is really related to the burst
sizes that hit the server...

But here's a patch which also closes PR#1293.  Note that we currently
don't count the total number of children in the loop, so I had to add
that.  With this we can probably figure out what % is a good %.

Dean

Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
retrieving revision 1.236
diff -u -r1.236 http_main.c
--- http_main.c	1997/10/22 16:43:05	1.236
+++ http_main.c	1997/10/22 16:51:09
@@ -2984,6 +2984,7 @@
     int free_length;
     int free_slots[MAX_SPAWN_RATE];
     int last_non_dead;
+    int total_non_dead;
 
     /* initialize the free_list */
     free_length = 0;
@@ -2991,6 +2992,7 @@
     to_kill = -1;
     idle_count = 0;
     last_non_dead = -1;
+    total_non_dead = 0;
 
     sync_scoreboard_image();
     for (i = 0; i < daemons_limit; ++i) {
@@ -3023,6 +3025,7 @@
 	    break;
 	}
 	if (ss->status != SERVER_DEAD) {
+	    ++total_non_dead;
 	    last_non_dead = i;
 #ifdef OPTIMIZE_TIMEOUTS
 	    if (ss->timeout_len) {
@@ -3068,11 +3071,13 @@
 	    idle_spawn_rate = 1;
 	}
 	else {
-	    if (idle_spawn_rate >= 4) {
-		aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, server_conf,
-		    "server seems busy, spawning %d children (you may need "
-			"to increase StartServers, or Min/MaxSpareServers)",
-			    idle_spawn_rate);
+	    if (idle_spawn_rate >= 8) {
+		aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, server_conf,
+		    "server seems busy, (you may need "
+		    "to increase StartServers, or Min/MaxSpareServers), "
+		    "spawning %d children, there are %d idle, and "
+		    "%d total children", idle_spawn_rate,
+		    idle_count, total_non_dead);
 	    }
 	    for (i = 0; i < free_length; ++i) {
 		make_child(server_conf, free_slots[i], now);


Mime
View raw message