You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@worldgate.com> on 1997/10/22 16:45:58 UTC

New error_log format (fwd)

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?

On a small site with 5 servers normally running, starting 4 at 
once could be a big deal.

On a site with 1000 servers normally running, I'm not sure that 4 at once
is a big deal.

---------- Forwarded message ----------
>Path: scanner.worldgate.com!news.maxwell.syr.edu!howland.erols.net!news2.digex.net!digex!lynx.unm.edu!news.plk.af.mil!fugu!mr2.mst6.lanl.gov!nntp-server.caltech.edu!agora.ugcs.caltech.edu!btman
>From: Brian Tiemann <bt...@ugcs.caltech.edu>
>Newsgroups: comp.infosystems.www.servers.unix
>Subject: New error_log format
>Date: Tue, 21 Oct 1997 22:08:07 -0700
>Organization: California Institute of Technology, Pasadena
>Lines: 24
>Message-ID: <Pi...@agora.ugcs.caltech.edu>
>NNTP-Posting-Host: agora.ugcs.caltech.edu
>Mime-Version: 1.0
>Content-Type: TEXT/PLAIN; charset=US-ASCII
>Xref: scanner.worldgate.com comp.infosystems.www.servers.unix:34569     


	Hi again--

	Just out of curiosity... in the new error_log format in Apache
1.3, how come spawning new servers is treated as such a dire thing?

[Tue Oct 21 20:31:36 1997] [error] server seems busy, spawning 4 children
(you may need to increase StartServers, or Min/MaxSpareServers)

	I thought Apache was designed to spawn new servers as load
required, and then to let them die off as directed by Min/MaxSpareServers.
That's indeed how it behaves for me, and the settings for my server are
about evenly matched with the number of httpd processes at any given time.
Yet whenever it needs to spawn a few new processes, I get the above
message in my error_log.

	It's just a semantics thing, I realize-- but shouldn't it be
considered less an "error" and more a "notice"? And should it really be so
stern about telling the administrator to reconfigure each time it appears?
Unless, of course, it's spawning 16 or more new processes at once... 

Brian



Re: [PATCH] Re: New error_log format (fwd)

Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Wed, Oct 22, 1997 at 10:55:37AM -0700, Dean Gaudet wrote:
> 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 %.

Looks good; esp. gives the admin more information about the situation.
+1 definitely.

    Martin
-- 
| S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

[PATCH] Re: New error_log format (fwd)

Posted by Dean Gaudet <dg...@arctic.org>.
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);