Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jun 1997 18:14:25 -0600 (MDT)
From:      Marc Slemko <marcs@znep.com>
To:        Brian Tao <taob@nbc.netcom.ca>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: gethostbyname() and fds >255 
Message-ID:  <Pine.BSF.3.95.970621180925.26949D-100000@alive.znep.com>
In-Reply-To: <Pine.GSO.3.95.970621190925.20160K-100000@tor-adm1.nbc.netcom.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 21 Jun 1997, Brian Tao wrote:

> On Sat, 21 Jun 1997, Marc Slemko wrote:
> > 
> > Guess I'll have to double check what else was broken when FD_SETSIZE
> > was increased and make a patch for 2.2 that I can point people to.
> > My biggest concern in this is that Apache 1.2 will not work with
> > >~255 fds used for logs without recompiling libc with a larger
> > FD_SETSIZE. 
> 
>     I believe someone just added that very problem to the Apache FAQ.
> You will need to rebuild libc if your FD_SETSIZE is initially set to
> 256 to support more than 255 virtualhosts in Apache 1.2.

Yes, I know.  It isn't just a coincidence that it happened right after I
had a chance to track down the problem.  <g>

To clarify, it is not needed to support more than 255 virtualhosts, but
more than 255 file descriptors being used for other things.  As long as
you don't use Listen directives or seperate logfiles for each virtual
host, you will have no problems with fd limits.

And for anyone needing to make Apache work when it needs more than 256
file descriptors without having to recompile libc, a patch that has been
tossed around for a while is current being tested in preparation for
integration.  It will use fcntl's F_DUPFD to leave enough low numbered fds
free for use by broken library calls.  Should be available somewhere
sometime somehow.

-- 
     Marc Slemko     | Apache team member
     marcs@znep.com  | marc@apache.org




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.970621180925.26949D-100000>