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.

Why does ServerLimit have to be equal to MaxClients

Discussion in 'General Discussion' started by budlight, Jan 31, 2011.

  1. budlight

    budlight Member

    Joined:
    Jan 11, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    I really don't get this requirement of easyapache's configuration file build and don't understand how to override it. I understand the reason why it exists for mpm-prefork, but I'm using mpm-worker and and if I place overrides in "Pre VirtualHost Include" they are ignored as they are found earlier on in the config file. I know that apache should never start 256 servers like i have to set it to allow 256 max clients but personally i find it irritating to not be able to set this to a more reasonable value like 16.
     
  2. Joriz

    Joriz Active Member

    Joined:
    Aug 11, 2004
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    the Netherlands
    cPanel Access Level:
    DataCenter Provider
    Same problem here, also using mpm-worker . I need to edit httpd.conf every time cPanel changes is to set maxclients to a higher value.

    Did you find a solution to the problem?
     
    #2 Joriz, Jul 16, 2011
    Last edited: Jul 16, 2011
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello Joriz,

    You can edit /var/cpanel/conf/apache/local (if it doesn't exist, copy /var/cpanel/conf/apache/main to /var/cpanel/conf/apache/local and edit the local copy) for the maxclients and serverlimit values and those will then be retained on updates.

    After editing, you would simply redistill, rebuild and restart Apache after making a backup of it first:

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110718
    /usr/local/cpanel/bin/apache_conf_distiller --update
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
    Thanks!
     
  4. Joriz

    Joriz Active Member

    Joined:
    Aug 11, 2004
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    the Netherlands
    cPanel Access Level:
    DataCenter Provider
    Thank you very much Tristan. Now Apache is working correctly with MPM worker the way I want.
     
Loading...

Share This Page