httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c
Date Wed, 10 Apr 2002 17:02:00 GMT
stoddard    02/04/10 10:02:00

  Modified:    .        CHANGES
               server/mpm/winnt mpm_winnt.c
  Log:
  The accept loop was sleeping way too long when we ran out of completion contexts.
  All that is really necessary is that the accept look yield the rest of its time slice
  when this condition is hit.
  
  Revision  Changes    Path
  1.700     +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.699
  retrieving revision 1.700
  diff -u -r1.699 -r1.700
  --- CHANGES	9 Apr 2002 09:45:04 -0000	1.699
  +++ CHANGES	10 Apr 2002 17:01:59 -0000	1.700
  @@ -1,4 +1,7 @@
   Changes with Apache 2.0.36
  +  *) Win32: Fix problem that caused rapid performance degradation
  +     when number of connecting clients exceeded ThreadsPerChild.
  +     [Bill Stoddard]
   
     *) Fixed a segfault parsing large SSIs on non-mmap systems.
        [Brian Havard]
  
  
  
  1.263     +5 -4      httpd-2.0/server/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.262
  retrieving revision 1.263
  diff -u -r1.262 -r1.263
  --- mpm_winnt.c	10 Apr 2002 15:17:42 -0000	1.262
  +++ mpm_winnt.c	10 Apr 2002 17:02:00 -0000	1.263
  @@ -921,8 +921,9 @@
           if (!context) {
               /* Hopefully whatever is preventing us from getting a 
                * completion context is a temporary resource constraint.
  +             * Yield the rest of our time slice.
                */
  -            Sleep(750);
  +            Sleep(0);
               continue;
           }
   
  @@ -931,11 +932,11 @@
           if (context->accept_socket == INVALID_SOCKET) {
               context->accept_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
               if (context->accept_socket == INVALID_SOCKET) {
  -                /* Hopefully another temporary condition. Be graceful. */
  +                /* Another temporary condition? */
                   ap_log_error(APLOG_MARK,APLOG_WARNING, apr_get_netos_error(), ap_server_conf,
                                "winnt_accept: Failed to allocate an accept socket. "
                                "Temporary resource constraint? Try again.");
  -                Sleep(500);
  +                Sleep(100);
                   goto again;
               }
           }
  @@ -971,7 +972,7 @@
                                "winnt_accept: AcceptEx failed. Attempting to recover.");
                   closesocket(context->accept_socket);
                   context->accept_socket = INVALID_SOCKET;
  -                Sleep(500);
  +                Sleep(100);
                   goto again;
               }
   
  
  
  

Mime
View raw message