You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/05/07 20:42:51 UTC

os-solaris/552: Web server stops operating properly when using lot of virtual domains (fwd)

This is essentially the solution I've been advocating for a while (but
note that he didn't get it complete or correct).  Should I just whip up a
contrib patch for post-1.2 consideration? 

Dean

---------- Forwarded message ----------
Date: Tue, 6 May 1997 12:00:04 -0700 (PDT)
From: Igor Brezac <ig...@ipass.net>
To: apache-bugdb@apache.org
Cc: apache-bugdb@apache.org
Subject: os-solaris/552: Web server stops operating properly when using lot of virtual domains


>Number:         552
>Category:       os-solaris
>Synopsis:       Web server stops operating properly when using lot of virtual domains
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache (Apache HTTP Project)
>State:          open
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Tue May  6 12:00:03 1997
>Originator:     igor@ipass.net
>Organization:
apache
>Release:        1.1.3 & 1.2b10
>Environment:
Solaris 2.5 & 2.5.1 w/ latest patches
SunOS passport.ipass.net 5.5.1 Generic_103640-08 sun4u sparc SUNW,Ultra-1
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2.2/specs
gcc version 2.7.2.2
>Description:
This is famous Solaris bug where open() will not be able to create 
file descriptor greater then 256 even if ulimit allows more.


>How-To-Repeat:
Setup apache with 130 virtual domains and have at least 2 open logs for each
domain.  CGI scripts will not work.
>Fix:
alloc.c - enhanced popenf routine

int popenf(struct pool *a, char *name, int flg, int mode)
{
  int fd;
#ifdef SOLARIS2
  int nfd;
#endif

  block_alarms();
  fd = open(name, flg, mode);
#ifdef SOLARIS2
  if (fd >= 0 && fd < 256) {
    nfd = fcntl(fd, F_DUPFD, 256);
    close(fd);
    fd = nfd;
  }
#endif
  if (fd >= 0) note_cleanups_for_fd (a, fd);
  unblock_alarms();
  return fd;
}
%0
>Audit-Trail:
>Unformatted: