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 MaxClients only accepts 256 :(

Discussion in 'EasyApache' started by sh4ka, Sep 21, 2005.

  1. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    I have a server with lot of customers and I recently migrate all of them to this new server and when I set MaxClients 900 at the httpd.conf configuration everything look ok till I restarted apache and then this appears:

    /etc/init.d/httpd stop: httpd stopped
    WARNING: MaxClients of 900 exceeds compile time limit of 256 servers,
    lowering MaxClients to 256. To increase, please see the
    HARD_SERVER_LIMIT define in src/include/httpd.h.
    /etc/init.d/httpd start: httpd started

    In Ensim servers I can tell Apache to use 900 or more clients and I never have problems, it seems this is different in cPanel.

    Anyone knows how to fix this? ---> Is there an alternative way to fix this without touching the source files ( src/include/httpd.h. ) ????
     
    #1 sh4ka, Sep 21, 2005
    Last edited: Sep 21, 2005
  2. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    Does anyone knows about this, pleasee.. ? It is neccesary for me to upgrade the 256 size into 900.. if it is possible without touching the source files as the error shows there..

    thkz!
     
  3. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    You could try rebuilding Apache via WHM and checking "Raise HARD_SERVER_LIMIT" when doing so.
     
  4. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    A couple of our clients had this problem in the past. When we increased the MaxClient limit to 300, we got the following error message:

    /httpd/bin/apachectl configtest
    WARNING: MaxClients of 300 exceeds compile time limit of 256 servers,
    lowering MaxClients to 256. To increase, please see the
    HARD_SERVER_LIMIT define in src/include/httpd.h.

    We went to the /src/include directory where apache source was unzipped and edited httpd.h and changed HARD_SERVER_LIMIT from 256 to 1024 (This is prone to DOS attacks) and then recompiled and installed it with the normal options. If you don't do that, Apache automatically lowers the MaxClients to 256. Since you're running Apache with MaxClients set to 256, try running a config test on httpd.conf to check the results.

    My question: Are you sure you need to go higher than 256? You would need to have a huge connection and 10 million of hits a day to go over 256. In any case, you may not need such a high setting for MaxClients, if you turn off KeepAlives. On a high traffic web servers we use, setting the MaxClients up to 1000 caused extreme high load on the server, and during peak hours one day even we managed to DOS attack that very server. Now, Changing the KeepAlives to off and keeping MaxClients to 256 should be good enough.
     
  5. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    Thank you Andy, I will consider very seriously what you said..
     
  6. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    I had this issue on 2 servers, now I just checked the HARD LIMIT option at the Apache Build in WHM and the problem was fixed... Now.. I did the same on the other server but this time it still showing the error, also tried what you said about editing the source files and then recompiling but the error continue :(

    Anyone knows some other method to fix this ?
     
Loading...

Share This Page