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 on has exceeded the maximum amount of open files

Discussion in 'EasyApache' started by cheapo, Mar 19, 2003.

  1. cheapo

    cheapo Member

    Joined:
    Sep 6, 2002
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    How do i fix this?
     
  2. Chase

    Chase Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    This problem can be fixed in the httpd.conf file.
     
  3. ckevin

    ckevin Member

    Joined:
    Jan 17, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    My server also had this problem, how can I fix it in the httpd.conf file?
     
  4. Chase

    Chase Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    Hello,
    Do you have AIM or ICQ or any messengers if so PM me your name will help you out some more on there.
     
  5. remal

    remal Member

    Joined:
    Mar 19, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    i have the same proplem, can you post the solution here?
     
  6. Chase

    Chase Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    It looks like I'm going to have to if I get anymore request. Go ahead and shoot me a PM and I will type up on how to fix this in a few hours on the forums.
     
  7. WildWayz

    WildWayz Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    I have this problem too - how do i fix it?
    MaxClients is set to 260 at the moment...
     
  8. moalim

    moalim Active Member

    Joined:
    Jun 24, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    have this problem too - how do i fix it?
     
  9. silvernetuk

    silvernetuk Well-Known Member

    Joined:
    Sep 2, 2002
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    United Kingdom
    Having same problem to, how do I fix it ?

    Regards,
    Garry
     
  10. gleen

    gleen Member

    Joined:
    Nov 3, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Some problem here! Does Support monitor the forums at all?
     
  11. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    What makes you think this has anything to do the Control Panel?
     
  12. gleen

    gleen Member

    Joined:
    Nov 3, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
  13. IziTop

    IziTop Member

    Joined:
    Sep 12, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    same problem for me
     
  14. gleen

    gleen Member

    Joined:
    Nov 3, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    After a month with support I at least found out this info. And I stress "I found out" rather than useless support. The error is being reported by:

    /scripts/checkmaxclients

    It appears to search the error log for the phrase "you probably need to rebuild Apache with a larger FD_SETSIZE" and generates that email. The problem here is the cPanel script interprets "probably" to "has exceeded". I think it could be something else generating this warning in Apache, but who knows.

    Also curious since my Apache error log does NOT contain that line.

    And unknown why ${hostname} doesn't display properly.
     
  15. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Q: What makes you think this has anything to do the Control Panel?

    A: This: http://forums.cpanel.net/showthread.php?s=&threadid=11450&highlight=open+files


    Well, let's see. For some reason this thread appealed to me and some investigating showed the following.

    My Servers are in the neighbourhood of MaxClients 180.
    I did the testing mentioned at the link reference from gleen and discovered:


    ps -ef | grep apache -- to find the process id (I'll use 28181)
    -- showed 14 processes

    cd /proc/28181/fd; ls|wc -- to see the number of file descriptors open by apache
    -- showed one process, sometimes 3

    cd /proc/28181/fd; ls -lh|cat -n
    -- showed 486 files open for that process

    If the math is correct, 14 x 486 = 6,804
    then I am way over my alloted 1024 max. File Descriptors.

    That is obviously wrong though, as each process is using the same 486 open files. And, there are 191 zones on this Server, BTW.


    Can we then conclude that any FD_SETSIZE errors are due to; an over subscribed Server, an Apache setup that is not optimized, or is it that the kernel version is 2.0 or lower -- which has a max. FD Size of 256.


    If you have an inquiring mind -- and really want to know ;) -- then run the following:

    uname -a

    -- see what kernel version is really being used

    ulimit -Sa (this shows the soft limit settings)
    ulimit -Ha (this shows the hard limit settings)

    Find out what your current limits are. The Soft limit can be increased to the max. allowable Hard limit. If you are using a kernel version earlier than 2.2.x, you will need to either; upgrade to 2.4.x or install a patch. By default, I do believe, Soft limit should already be set to Hard limit -- of 1024. Mine are; using kernel 2.4.x. Check the Man page for 'ulimit' to find out more.

    You can also do:

    cd /proc; grep FDSize */status

    to shortcut your output and see what your FD Sizes are set to and current usage. This was mentioned in the thread shown above, but I use to, cut to the chase.


    One should seldom run into a problem with the FD Size and, if they do, hire someone (or do the learning) to optimize it. It's also possible that problems with FD Size is due to; Server is oversold, Apache not optimized, kernel is too old or not patched.

    Which brings me back to my question:
    What makes you think this has anything to do the Control Panel?

    Answer, I guess WHM/Cpanel could be better optimized, although I'm not sure how, but in the main, this problem is more to do with the kernel being used and, if any optimization methods are used. Both should help to overcome WHM/Cpanel's current shortcomings in this area.
     
    #15 Website Rob, Dec 6, 2003
    Last edited: Dec 6, 2003
  16. gleen

    gleen Member

    Joined:
    Nov 3, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Let me give a more detailed reason why I think it's cPanel's setup. Nothing concrete, but a lot of circumstatial. First, I never had this problem before cPanel. Second, the fact that discussions of this problem exist NOWHERE else on the internet but here, and here are are SEVERAL people saying "me too", which means there are probably hundreds who have the problem, without posting here.

    Also, the first message of that other thread:

    "I've verified that this does not occur with stock Apache installs."

    And finally the fact that noone in cPanel support seems to give a rat's ass, at least enough to come in here and deny it's their fault. Either they are completely ignoring their own forums for months, or they can't find the problem, or most likely, they don't care to try.
     
  17. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    The Support process is to first ask whomever provided you with your Cpanel License and then DarkOrb Support themselves -- using the form link provided with WHM. First, last, or inbetween, the Forum is always a good place to look for help or provide answers to WHM/Cpanel problems.

    May I say, gleen, that what you gave was a detailed opinion. I did not see any posted results of your testing and/or troubleshooting. Are you sure you know what to ask or, do you expect a Control Panel to do everything for you?

    BTW, since you are new to this forum, allow me to point out that it is a known fact, DarkOrb staff seldom post in their Forum. It was setup for the blind to help the blind. ;)
     
  18. gleen

    gleen Member

    Joined:
    Nov 3, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    That's what I did...

    And I believe I said I have nothing concrete, only circumstantial. I am not going to change around any Apache source code. I expect the product I'm paying $20/month for to work... I have very little time for this so I'm looking for an alternative to Apache instead. Right now I'm trying LiteSpeed.

    If that is their policy, it reflects very badly on them.
     
  19. compunet2

    compunet2 Well-Known Member

    Joined:
    Feb 21, 2003
    Messages:
    310
    Likes Received:
    0
    Trophy Points:
    16
    I had the same problem the other night with maxfiles. Oddly enough I found it to be a bad script. A customer installed php-nuke, and whenever they loaded it, tons of games.php's would show up in the apache status, with the server ip address. After I renamed games.php, it stopped. Any clue?
     
  20. RogelioH

    RogelioH Active Member

    Joined:
    Jun 2, 2003
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    So whats the fix for freebsd? i tried recompiling apache and nothing.
     
Loading...

Share This Page