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.

Disabling RLimitMEM directive from httdp.conf?

Discussion in 'General Discussion' started by daniel-b, Oct 7, 2010.

  1. daniel-b

    daniel-b Member

    Joined:
    Jul 28, 2010
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Hello there,

    I was wondering if is it there any way to remove that line, which was added after I executed that tool in WHM >> Main >> Service Configuration >> Apache Configuration >> Memory Usage Restrictions

    /usr/local/apache/conf/httpd.conf
    Regards.
     
  2. 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
    Hi,

    You could comment it out, remove it or change the setting in the /var/cpanel/templates/apache2/main.default file by doing the following:

    Code:
    cd /var/cpanel/templates/apache2
    cp main.default main.local
    vi main.local
    When editing main.local, you would then look for this line:

    Code:
    RLimitMEM [% main.rlimitmem.item.softrlimitmem %] [% main.rlimitmem.item.maxrlimitmem %]
    That is the line you would want to either comment out with # at the beginning, remove it or change to hard code to a higher variable. If you change it to hard code a higher limit, you'd want to remove the stuff after RLimitMEM and put the value you want instead.

    Please note you would then need to rebuild Apache and restart it for the changes to take effect:

    Code:
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
    As a final point, please ensure never to directly edit main.default as cPanel will overwrite those changes on each update (upcp). When you create a main.local file, Apache rebuilds and recompiles will look for that file and build httpd.conf from it.
     
  3. daniel-b

    daniel-b Member

    Joined:
    Jul 28, 2010
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    great! I got it, very useful, good to know it, thanks.

    Mmm does this value come enabled by default?
    RLimitCPU, or both RLimitCPU and RLimitMEM are enabled when running the tool at WHM?

    Thanks!
    regards.
     
  4. 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
    The value doesn't come enabled by default. It isn't there in main.default until after you select it in WHM > Apache Configuration > Memory Usage Restrictions area.
     
  5. daniel-b

    daniel-b Member

    Joined:
    Jul 28, 2010
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Mmm OK, then everything is fine.

    Thank you very much Danielle, really, I'm very grateful to you for your prompt and professional answer. This is now solved.

    Good night!
     
  6. 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
    Certainly, you are very welcome :)
     
  7. w3dgie

    w3dgie Registered

    Joined:
    May 3, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    @cPanelTristan

    Just came across this page today on Google. Wanted to thank you for your simple solution. :)
     
Loading...

Share This Page