httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apachen/src/main util.c
Date Tue, 11 Nov 1997 19:52:20 GMT
dgaudet     97/11/11 11:52:20

  Modified:    src      CHANGES
               src/main util.c
  Log:
  If ap_slack fails to allocate above the low slack line it's a good
  indication that further problems will occur; it's a better indication
  than many external libraries give us when we actually run out of
  descriptors.  So report it to the user once per restart.
  
  PR:		1181
  Reviewed by:	Jim Jagielski, Ken Coar
  
  Revision  Changes    Path
  1.502     +6 -0      apachen/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.501
  retrieving revision 1.502
  diff -u -r1.501 -r1.502
  --- CHANGES	1997/11/09 20:40:30	1.501
  +++ CHANGES	1997/11/11 19:52:16	1.502
  @@ -1,5 +1,11 @@
   Changes with Apache 1.3b3
   
  +  *) If ap_slack fails to allocate above the low slack line it's a good
  +     indication that further problems will occur; it's a better indication
  +     than many external libraries give us when we actually run out of
  +     descriptors.  So report it to the user once per restart.
  +     [Dean Gaudet] PR#1181
  +
     *) Change mod_include and mod_autoindex to use Y2K-safe date formats
        by default.  [Ken Coar]
   
  
  
  
  1.76      +15 -2     apachen/src/main/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/main/util.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- util.c	1997/10/27 16:30:30	1.75
  +++ util.c	1997/11/11 19:52:19	1.76
  @@ -66,9 +66,7 @@
   
   #include "httpd.h"
   #include "http_conf_globals.h"	/* for user_id & group_id */
  -#if defined(DEBUG)||defined(DEBUG_CFG_LINES)
   #include "http_log.h"
  -#endif
   #include <stdio.h>
   
   const char month_snames[12][4] =
  @@ -1620,6 +1618,7 @@
   #if !defined(F_DUPFD)
       return fd;
   #else
  +    static int low_warned;
       int new_fd;
   
   #ifdef HIGH_SLACK_LINE
  @@ -1637,6 +1636,20 @@
       }
       new_fd = fcntl(fd, F_DUPFD, LOW_SLACK_LINE);
       if (new_fd == -1) {
  +	if (!low_warned) {
  +	    /* Give them a warning here, because we really can't predict
  +	     * how libraries and such are going to fail.  If we can't
  +	     * do this F_DUPFD there's a good chance that apache has too
  +	     * few descriptors available to it.  Note we don't warn on
  +	     * the high line, because if it fails we'll eventually try
  +	     * the low line...
  +	     */
  +	    aplog_error(APLOG_MARK, APLOG_ERR, NULL,
  +		"unable to open a file descriptor above %u, "
  +		"you may need to increase the number of descriptors",
  +		LOW_SLACK_LINE);
  +	    low_warned = 1;
  +	}
   	return fd;
       }
       close(fd);
  
  
  

Mime
View raw message