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 Sun, 01 Jul 2001 22:49:34 GMT
rbb         01/07/01 15:49:33

  Modified:    server/mpm/threaded threaded.c
  Log:
  Fix the threaded MPM perform_idle_server_maintenance.  Basically, we now
  count how many threads are actually idle, regardless of which process they
  are in.  This patch makes us use (min_spare_threads|max_spare_threads)
  * number_of_running_servers to determine if we should kill of processes or
  start new ones.  This MPM no longer thrashes killing child processes as
  soon as they are created, and the server continues to serve requests even
  if the server is gracefully restarted and each child has one active thread.
  
  Revision  Changes    Path
  1.42      +2 -2      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.41
  retrieving revision 1.42
  diff -u -d -b -w -u -r1.41 -r1.42
  --- threaded.c	2001/06/28 22:15:53	1.41
  +++ threaded.c	2001/07/01 22:49:31	1.42
  @@ -1003,7 +1003,7 @@
       }
       ap_max_daemons_limit = last_non_dead + 1;
   
  -    if (idle_thread_count > max_spare_threads) {
  +    if (idle_thread_count > max_spare_threads * ap_max_daemons_limit) {
           /* Kill off one child */
           char char_of_death = '!';
           if ((rv = apr_file_write(pipe_of_death_out, &char_of_death, &one)) != APR_SUCCESS)
{
  @@ -1011,7 +1011,7 @@
           }
           idle_spawn_rate = 1;
       }
  -    else if (idle_thread_count < min_spare_threads) {
  +    else if (idle_thread_count < min_spare_threads * ap_max_daemons_limit) {
           /* terminate the free list */
           if (free_length == 0) {
   	    /* only report this condition once */
  
  
  

Mime
View raw message