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.

pre_main_global.conf not working?

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

  1. OooLong

    OooLong Well-Known Member

    Joined:
    Mar 16, 2011
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    I just installed mpm_worker and added this to pre_main_global.conf:

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

    to test to see if this actually work I change the variable and restart Apache.

    Code:
    <IfModule worker.c>
        ServerLimit          1
        StartServers          1
        MaxClients          1
        MinSpareThreads      1
        MaxSpareThreads      1
        ThreadsPerChild      1
        MaxRequestsPerChild   1
    </IfModule>
    to my surprise my site still response as normal, I tested this on multiple browser and deleted all cache. Is my use of pre_main_global.conf correct? what should I change? thanks in advance.
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    You can easily test to see if this is working by looking at httpd.conf. These templates are used to generate a working Apache configuration, so they will not be actually applied unless you:

    1) Rebuild the conf (/scripts/rebuildhttpdconf)
    2) Restart Apache

    It's possible you didn't do #1. So try that, then check your httpd.conf file to make sure the correct settings are in place before testing again.
     
  3. OooLong

    OooLong Well-Known Member

    Joined:
    Mar 16, 2011
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    I did both step 1 & 2 and this don't really have anything to do with httpd.conf as it concern pre_main_global.conf and the settings in it. Was it right for me to put those setting in pre_main_global.conf?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,666
    Likes Received:
    646
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, it's acceptable to add those values to the "/usr/local/apache/conf/includes/pre_main_global.conf" file.

    Could you elaborate more on what change you are expecting to see? Is there a specific increase in page load or speed that you are expecting?

    Thanks.
     
Loading...

Share This Page