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.

Apachelimits

Discussion in 'EasyApache' started by RedFutura, Mar 24, 2006.

  1. RedFutura

    RedFutura Well-Known Member

    Joined:
    Jun 11, 2003
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    On one server apache is using up all RAM available (4GB) and the server starts using swap, which makes the load go up a lot.

    I am trying to limit the amount of memory apache uses. How does the script apachelimits.pl work? It always sets the limit to 443MB, even if all RAM is being used at the moment when I run the script.

    If I modify the values in httpd.conf is that enough to change the amount of memory that apache uses?
     
  2. RedFutura

    RedFutura Well-Known Member

    Joined:
    Jun 11, 2003
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
  3. nappa

    nappa Active Member

    Joined:
    Aug 2, 2003
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    open up the httpd.conf file in your fav editor. Right at the top you will see a few values like :

    # ================

    RLimitMEM xxxxxxxxxxxxx

    # ================

    Change it to :

    # ================

    RLimitMEM 33937066

    # ================

    That limits it something around about 30Mb. Which is really a process really should need at the most. I've gotten away with using 15MB before too.
     
  4. RedFutura

    RedFutura Well-Known Member

    Joined:
    Jun 11, 2003
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    What value do you have for RLimitCPU?

    And why does apachelimits.pl assign so much memory to each apache process?
     
  5. nappa

    nappa Active Member

    Joined:
    Aug 2, 2003
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    differs from server to server. However, anything between 60 - 240 is alright. Stick to 100s, that would be more than safe. These values would need to be tested on your server for a while before being totally what you need. I've only specified what I used for my needs. Which is low volume shared hosting.
     

Share This Page