Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 2002 17:05:59 -0700 (PDT)
From:      Larry Tai <larry@wald.ucdavis.edu>
To:        stable@FreeBSD.ORG
Subject:   How to find out the default FD_SETSIZE in Freebsd-4.5 stable?
Message-ID:  <Pine.OSF.4.21.0207101635360.24927-100000@wald.ucdavis.edu>

next in thread | raw e-mail | index | archive | help

Hi,

     Is there any way to find out what the default FD_SETSIZE under
Freebsd-4.5-stable is?  And is this a kernel parameter that can be
increased without penalty of performance degradation elsewhere?

     My Apache-2.0.39_3 hangs periodically with these messages in the
error log:

----
"Wed Jul 10 00:54:46 2002] [warn] (61)Connection refused: connect to
     listener"
...
...
[Wed Jul 10 11:12:57 2002] [warn] new file descriptor 1222 is too
     large; you probably need to rebuild Apache with a larger FD_SETSIZE
     (currently 1024)
----

     After some google searches, I came across a few references of
FD_SETSIZE being too small in some older versions of FBSD and Apache.  In
this case, I know for sure that Apache seems to want more than what it was
built with.

     It seems that I need to rebuild Apache-2.0.39_3 from port with extra
CFLAGS defined, specifically "-DFD_SETSZIE=8192".  I tried putting it in
the different configure files and make files but the definitions seemed to
always get lost or ignored everytime I do a make.  Could it be that the
"make" process generates a new configure file every time?

     I'm not sure which file(s) I should change and the exact syntax of
the line. Most of the feedbacks from google mentioned that the lines with
either CFLAGS and EXTRA_CFLAGS in the configure file should be changed as
in:
                     CFLAGS=-DFD_SETSIZE=8192

     The problem is that there aren't any lines that conveniently look
like "CFLAGS=" defines that I can change in the configure file from the
port.  I've also tried putting the string as an ENV variable and that
didn't help either.  A log of the make process did not show the extra
CFLAGS was used at all.

     I have posted the question to the Apache httpd list but I haven't
received any responses yet.

     Any help you can give me to recompile Apache with the new FD_SETSIZE
value would be greatly appreciated.

     I'm running FreeBSD 4.5-stable and I'm only supporting five virtual
hosts.  Is a default FD_SETSIZE of 1024 too low?

     In general, if one needs to customize the compilation process of a
particular port, what is the best way to insert extra compiler/loader
flags without losing them in the "make" process?

     Thanks in advance.

---------
 US-Mail:  Larry Tai
           Department of Statistics
           368 Kerr Hall
           University of California, Davis
           One Shields Avenue
           Davis, CA 95616
  E-Mail:  larry@wald.ucdavis.edu or lptai@ucdavis.edu
     Tel:  (530)-752-6085         FAX:  (530)-752-7099


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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