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.

Increasing Apache MaxClients Limit

Discussion in 'EasyApache' started by trhosting.net, Oct 14, 2008.

  1. trhosting.net

    trhosting.net Well-Known Member

    Joined:
    Mar 7, 2006
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Turkey
    Hello,

    I am having trouble with apache MaxClients limit.
    I want to increase it and set it to 800 from httpd-mpm.conf file but on apache status page it doesn't exeed 256. It always shown as "256 requests currently being processed, 0 idle workers". It seems a server limit or compile time limit but i don't know how to change it.

    How can i increase it?

    My httpd-mpm.conf files prefork section:
    <IfModule mpm_prefork_module>
    StartServers 50
    MinSpareServers 50
    MaxSpareServers 100
    MaxClients 800
    MaxRequestsPerChild 0
    </IfModule>
     
  2. felosi

    felosi Active Member

    Joined:
    Aug 27, 2006
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Its something with the apache compile. I never figured out how to raise it with 2 and 2.2 . But you can raise it in 1.3 in the easyapache, if that is not enough you can edit the httpd.h file I think and add the line for hard limit
     
  3. trhosting.net

    trhosting.net Well-Known Member

    Joined:
    Mar 7, 2006
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Turkey
    The limit is hardcoded to apache 2.x and it is not possible to change it from config files.
    This is the information about this that i can find. I didn't find any way to change it.

    I have downgraded to apache 1.3.41. The hardcoded limit automatically increased to 2048. Then i set the MaxClients variable.

    This is a big problem with the apache 2.x config.
    I have created a bug report for this that you can poll.
    http://bugzilla.cpanel.net/show_bug.cgi?id=7853
     
  4. alex318

    alex318 Member

    Joined:
    Jun 4, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Just insert ServerLimit directive before MaxClients will help.

    For example:

    ServerLimit 512

    StartServers 32
    MinSpareServers 5
    MaxSpareServers 20
    MaxClients 512
    MaxRequestsPerChild 1000

    Don't forget to distill your apache configuration for the next cpanel update.
     
    #4 alex318, Apr 28, 2009
    Last edited: Apr 28, 2009
  5. charliesxia

    charliesxia Member

    Joined:
    Aug 3, 2006
    Messages:
    18
    Likes Received:
    1
    Trophy Points:
    0
    seems useless
    i always get
    ServerLimit directive before MaxClients
    128 requests currently being processed:confused:, 0 idle workers
     
  6. trhosting.net

    trhosting.net Well-Known Member

    Joined:
    Mar 7, 2006
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Turkey
    ServerLimit works if you set it from WHM.
    But not works if you set it from config files.

    You can set it from Apache Configuration -> Include Editor

    Write your configuration to Pre Main Include field.
    This works
     
Loading...

Share This Page