The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[FreeBSD] FD_SETSIZE

Discussion in 'General Discussion' started by Escaflowne, Dec 19, 2005.

  1. Escaflowne

    Escaflowne Active Member

    Joined:
    May 5, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    PL
    Hello!

    Recently I recompiled Apache through WHM (Update Apache. I've checked the box next to: Raise FD_SETSIZE to 16384 (System Wide), but still I get this in Apache's error log:
    Question: why 1024 and not 16384?
     
  2. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    You need to increase the value of FD_SETSIZE in your Apache build. You may also need to increase the number in your Kernel.What's the current version running on your server?
     
  3. Escaflowne

    Escaflowne Active Member

    Joined:
    May 5, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    PL
    HOW do I do it?

    Inserting:
    options FD_SETSIZE=16384
    in my kernel options file gives me:
    unknown option "FD_SETSIZE"
    when I try to compile the kernel.
    I'm running FreeBSD 4.9
     
  4. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    16
    4.9 is no longer supported by cpanel. I suggest upgrading your OS
     
  5. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    The FD_SETSIZE option is a hard-limit that is set in the code. It is a hard-limit to prevent Apache from running away and crashing your server. 1024 is enough, unless you have high traffic accounts that run a lot of scripts. The ulimit and FD_SETSIZE have to be raised together in order to make any difference. The ulimit affects the amount of files a particular shell can open, and if your shell can only open 1024 files, then raising FD_SETSIZE won't make a difference. The only way to change the FD_SETSIZE is to modify the apache source then rebuild it. Since the cPanel comes with its own Apache, it is not possible and you might bug down your cPanel.
     
  6. Escaflowne

    Escaflowne Active Member

    Joined:
    May 5, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    PL
    Thank you for this explanation.

    Great.... :mad:
     

Share This Page