*BSD News Article 96870


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!newsfeed.nacamar.de!news.he.net!scanner.worldgate.com!not-for-mail
From: Marc Slemko <marcs@znep.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Apache Woes.
Date: 3 Jun 1997 14:41:29 GMT
Organization: WorldGate Inc.  http://www.worldgate.com/
Lines: 50
Message-ID: <5n1aep$7pg$1@scanner.worldgate.com>
References: <5mvko8$s45$1@kayrad.ziplink.net>
NNTP-Posting-Host: valis.worldgate.com
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:42181

[posted and mailed]

/usr/include/sys/types.h:

/*
 * Select uses bit masks of file descriptors in longs.  These macros
 * manipulate such bit fields (the filesystem macros use chars).
 * FD_SETSIZE may be defined by the user, but the default here should
 * be enough for most uses.
 */
#ifndef FD_SETSIZE
#define FD_SETSIZE      256
#endif

126 * 2 = 252, then add a few for stdin, stdout, stderr, the socket
that accepts connections, etc. and you go over 256.

In 2.1, you may have trouble getting around this.  Changing FD_SETSIZE
to 1024 and doing a make world (ie. full rebuild of entire source,
including kernel and Apache) may work.  You may be able to make it
work just by recompiling the kernel and Apache with FD_SETSIZE set to
something larger.

Under 2.2, I think you should be able to just compile Apache with
FD_SETSIZE set to a larger value and have it work, but I have reports
of it being broken.

Your easiest solution is certainly to use less file descriptors.  

In <5mvko8$s45$1@kayrad.ziplink.net> Steve Bernacki Jr <steve@zip1.ziplink.net> writes:

>I'm running FreeBSD 2.1.7.1 and Apache 1.1.3 with 126 virtual hosts
>ifconfig'ed to the ethernet alias.  Things have been working fine until I
>attempted to add another virtual site-- now every connection to the server
>results in a SYSSEGV error message sent to error.log and no web pages
>being served. According to the FAQ, this is a resource issue: however, I
>recompiled my kernel with the following options (recommended on the
>webpage):

>maxusers        256

>options         "NMBCLUSTERS=4096"
>options         "CHILD_MAX=1024"
>options         "OPEN_MAX=1024"

>Still, though, adding one more virtual site causes things to croak.  What
>am I missing?  

>Thank you very much,
>-S