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.

Apache FD_SETSIZE error - solution that worked for me.

Discussion in 'EasyApache' started by meweb, Apr 6, 2003.

  1. meweb

    meweb Well-Known Member

    Joined:
    Feb 10, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    Hello Everybody,

    We had been facing the FD_SETSIZE error for the last few days wherein perl scripts used to turn blank after about 1 hour and apache used to hangup every 2-3 hours. The error showed the above error.

    We fixed this error in the following way. Hope this works for you also.

    1. do easyapache using the 6th option.
    2. raise HARD_SERVER_LIMIT and FD_SETSIZE
    3. save and compile with other required options.

    Some entries in httpd.conf need to be checked for.
    4. Edit httpd.conf check for the following parameters.

    MinSpareServers 5
    MaxSpareServers 10
    StartServers 5
    MaxClients 200

    Set the paramters to these values if they are higher than the ones above stated.

    5. To check whether the error is actaully removed empty error_log using
    echo > /usr/local/apache/logs/error_log

    6. restart apache manually.
    7. check error_log using.
    grep "FD_SETSIZE" /usr/local/apache/logs/error_log

    8. To check apache server status you can turn on the server-status from httpd.conf

    <Location /servername-status>
    SetHandler server-status
    Order allow,deny
    Allow from all
    Allow from localhost
    Allow from ".serverhostname"
    </Location>

    Replace the servername above with your server name and server host name with server's host name.
    You can access it using http://ipaddress/servername-status
    This URL should need kept confidential.
    8. restart httpd.

    The above steps solved my problem. Hope they work for you also.

    Please pm me or let me know here if it works for you.

    Good Luck.

    Admin,
    Meweb.
     
  2. Nico

    Nico Well-Known Member

    Joined:
    Dec 5, 2001
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Edmond, OK
    We have had that issue for a few days now. I tried the fix and so far it seems to have resolved the FD_SETSIZE error, but Apache appears to be restarting for some reason now:

    root@spector [~]# grep SIGUSR1 /usr/local/apache/logs/error_log
    [Mon Apr 7 11:00:14 2003] [notice] SIGUSR1 received. Doing graceful restart
    [Mon Apr 7 11:10:15 2003] [notice] SIGUSR1 received. Doing graceful restart
    [Mon Apr 7 11:15:16 2003] [notice] SIGUSR1 received. Doing graceful restart
     
  3. meweb

    meweb Well-Known Member

    Joined:
    Feb 10, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
  4. cikul

    cikul Well-Known Member

    Joined:
    Nov 15, 2002
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Thank's meweb, this is good solutions for me.. i got problem with this, and now solved.
     
  5. Ciaran

    Ciaran Registered

    Joined:
    Feb 20, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    England, UK
    I seem to be having this FD_SETSIZE problem quite frequently... in fact, it reoccured on a machine that we had already applied the patch for, and I think it's because WHM must have updated Apache automatically. It's really irritating to have to recompile again, then CTRL-Z and do "patch -p0 < apache.fdsetsize.patch" at the right time.

    Is there a way to have WHM automatically apply the patch? This problem is causing downtime for our customers and I'm concerned.
     
  6. meweb

    meweb Well-Known Member

    Joined:
    Feb 10, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    Hello Ciaran,

    If you have already compliled apache once, then you can skip steps 1,2 and 3.

    Start the procedure from point number 4.

    Let me know if this works for you well.

    Regards,
     
  7. Ciaran

    Ciaran Registered

    Joined:
    Feb 20, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    England, UK
    Will this work even if WHM automatically updates Apache? The upgrade wouldn't contain the raised FD_SETSIZE values, right?
     
  8. FWC

    FWC Well-Known Member

    Joined:
    May 13, 2002
    Messages:
    354
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Ontario, Canada
    WHM doesn't automatically update Apache. You have to run /scripts/easyapache manually to update Apache.
     
  9. meweb

    meweb Well-Known Member

    Joined:
    Feb 10, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    Just an update, remeber to remove the server-status after some days to prevent anyone from accessing it.

    Regards,
     
  10. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    Thanks Meweb. Without experienced people like you around, guys like me will be lost. :)
     
  11. meweb

    meweb Well-Known Member

    Joined:
    Feb 10, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    Hello Stephan,

    Thanks for your reply.

    Really appreciate it.

    Regards,
     
  12. meweb

    meweb Well-Known Member

    Joined:
    Feb 10, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    Did anyone face this problem after the latest 6.4 upgrade.

    Regards,
     
  13. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Does anyone know why this is happening?

    I have a server with 3 measly domains that still crashes once a week from this????

    I hate to fix something when I don't know why it broke.

    So far two servers are experiencing this mystery.... Both on the 6.4.2 R5

    Thank you, Charles

    Great toturial BTW... ;)

    cPanel.net Support Ticket Number:
     
    #13 DWHS.net, May 26, 2003
    Last edited: May 26, 2003
Loading...

Share This Page