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.

httpd.conf priority

Discussion in 'General Discussion' started by OooLong, May 6, 2014.

  1. OooLong

    OooLong Well-Known Member

    Joined:
    Mar 16, 2011
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    Hello,

    Let say if I have two directives, one in httpd.conf and one in pre_main_global, which one take precedence here and which get ignore? I know that I can just delete one, but I'm really curious as to how this work. Thanks.

    <IfModule worker.c>
    ServerLimit 40
    StartServers 2
    MaxClients 1000
    MinSpareThreads 20
    MaxSpareThreads 50
    ThreadsPerChild 25
    MaxRequestsPerChild 0
    </IfModule>
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. carlosbss

    carlosbss Member

    Joined:
    Jan 6, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi Michael

    Strange because i have in my pre_main_global:

    <IfModule mpm_worker_module>
    ServerLimit 26
    StartServers 10
    MaxClients 780
    MinSpareThreads 15
    MaxSpareThreads 35
    ThreadsPerChild 30
    MaxRequestsPerChild 1000
    </IfModule>

    But when i restart apache i get:

    # /etc/init.d/httpd restart
    WARNING: MaxClients (1024) is not an integer multiple
    of ThreadsPerChild (30), lowering MaxClients to 1020
    for a maximum of 34 child processes,
    WARNING: MaxClients (500) is not an integer multiple
    of ThreadsPerChild (30), lowering MaxClients to 480
    for a maximum of 16 child processes,

    the 1024 value comes from WHM -> Apache Config -> Global

    the 500 value i have no clue where it comes from.

    Should't the include override those values?

    Cheers
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Please open a support ticket so we can take a closer look and review the settings configured on your system. You can post the ticket number here so we can update this thread with the outcome.

    Thanks.
     
  5. carlosbss

    carlosbss Member

    Joined:
    Jan 6, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Ticket 5111579
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    To update, the user was advised to disable some additional custom entries added to /usr/local/apache/conf/includes/post_virtualhost_global.conf to see if that makes a difference.

    Thank you.
     
Loading...

Share This Page