httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/server/mpm/threaded threaded.c
Date Tue, 03 Jul 2001 13:58:17 GMT
rbb         01/07/03 06:58:15

  Modified:    server/mpm/threaded threaded.c
  Log:
  Fix the forking/killing logic in the threaded MPM.  The problem we were
  seeing with the server eating itself wasn't because we were comparing
  the idle_thread_count and min/max spare servers wrong.  It was because
  we were counting idle_thread_count incorrectly.  This fixes that problem.
  
  Revision  Changes    Path
  1.44      +3 -3      httpd-2.0/server/mpm/threaded/threaded.c
  
  Index: threaded.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/threaded/threaded.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -d -b -w -u -r1.43 -r1.44
  --- threaded.c	2001/07/03 05:16:33	1.43
  +++ threaded.c	2001/07/03 13:58:10	1.44
  @@ -1003,15 +1003,15 @@
       }
       ap_max_daemons_limit = last_non_dead + 1;
   
  -    if (idle_thread_count > max_spare_threads * total_non_dead) {
  -        /* Kill off one child */
  +    if (idle_thread_count > max_spare_threads) {
           char char_of_death = '!';
  +        /* Kill off one child */
           if ((rv = apr_file_write(pipe_of_death_out, &char_of_death, &one)) != APR_SUCCESS)
{
               ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, "write pipe_of_death");
           }
           idle_spawn_rate = 1;
       }
  -    else if (idle_thread_count < min_spare_threads * total_non_dead) {
  +    else if (idle_thread_count < min_spare_threads) {
           /* terminate the free list */
           if (free_length == 0) {
   	    /* only report this condition once */
  
  
  

Mime
View raw message