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.

How to find out memory leaks?

Discussion in 'General Discussion' started by mohd_007, Feb 27, 2012.

  1. mohd_007

    mohd_007 Well-Known Member

    Joined:
    Sep 22, 2007
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    I have tried to search all over the internet, but couldn't find proper and explanatory answer.

    Question: How to find out memory leaks on cpanel server? for example I have a server with 8GB of ram which is sufficient enough, but still free -m shows only 512m free. In addition to this, sometimes I see error ""out of memory" in var/log/messages.

    Further, I am unable to find the reason to why the /var/log/messages shows the following.

    ALERT - script tried to increase memory_limit to 268435456 bytes which is above the allowed value (attacker

    * I want to know the every possibility where I would find how does memory leaks.
    * I want to know how to find which script is culprit and causing high memory usage, even though there are no instances in top or ps.
    * I want to know how to find whether some software on the server is causing issues.

    Any professional reply would be helpful for me and other learners on the internet.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Please provide the full line of that error message, it may be useful.

    You might be able to find some clues as to which account is using more memory than the others, here:
    WHM > Server Status > Daily Process Log

    At top of that page you can click the date to go back a day or more as needed.
     
  3. mohd_007

    mohd_007 Well-Known Member

    Joined:
    Sep 22, 2007
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    Thanks for replying..

    One error is


    Feb 26 18:01:22 servername suhosin[21364]: ALERT - script tried to increase memory_limit to 134217728 bytes which is above the allowed value (attacker 'xx.xx.xx.xx', file '/home/user/public_html/includes/class_xml.php', line 37)

    Another one I found yesterday was "Out of memory"

    and one thing, I see lot of php processes in top which is causing load .. is this related to memory?


    4716 user 15 0 153m 47m 7184 D 2.0 0.6 0:00.40 /usr/bin/php /home/user/public_html/index.php
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
Loading...

Share This Page