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.

Out of memory! Message in Error Log

Discussion in 'General Discussion' started by postcd, Jul 3, 2014.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    624
    Likes Received:
    6
    Trophy Points:
    18
    /usr/local/cpanel/logs/error_log
    ha slines like:
    Please any advice on what to do to fix?


    my max cpanel process memory is: 512Mb

    One user reports, that he sees blank page after cpanel account login screen..

    ----
    i temporarilly fixed this by restarting mysqld,
    in my case i seen by top and htop that mysql processes taking alot of memory, exhausting available mem for my server. after restart account is accessible again (blank page away). I also increased "max cpanel process memory" from 512 to 1024 from within WHM / Server Configuration/ Tweak settings.
     
    #1 postcd, Jul 3, 2014
    Last edited: Jul 3, 2014
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. HostCenter IL

    HostCenter IL Active Member
    PartnerNOC

    Joined:
    Nov 22, 2011
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I just had the same problem. Is there any way to fix it other than restarting MySQL? (This is not a really good idea on a shared hosting server.)
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Are you taking a specific action when you notice the "Out of Memory" message in the cPanel error log? Have you tried increasing the value for "Max cPanel process memory" in "Tweak Settings"?

    Thank you.
     
  5. Tool Outfitters

    Joined:
    Nov 13, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    This issue began for me back in June. The way I fixed the issue is I added more swap (was 1GB, now 3GB). My question is why all of a sudden did cpanel functions (update, backup, etc...) begin (and continues) to consume a great deal of memory?

    The reason I ask is I feel that cpanel is consuming so much memory that it is taking away from the normal daily operation. For example, I can reboot my server and during the day I will be using about half of my 3.4GB physical memory with MySql utilizing about 14% and no swap being used. After/during cpanel cron runs the update, bincheck, or backup, all of my physical memory is consumed and swap has to be utilized. Also MySql memory drops to about 11%.

    At the time I did open a support ticket but the response was try this or that. Instead of suggesting "this or that" why not find out the cause and fix it?

    Before this all occurred, my backups used to take no longer than 30 minutes and now they take almost 3 hours.

    Attached is a graph of the last 24 hours and last 7 days that show the spike in memory everyday that cpanel cron occurs.
     

    Attached Files:

  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Please ensure you read the following post to fully understand how memory usage works:

    Memory Usage Higher Than Expected

    That's not to say your memory usage is normal, especially with SWAP usage, but it's import to post that link for others that may see this thread.

    Feel free to open a support ticket if you want us take a closer look at the backup generations on your system to see if we notice anything out of the ordinary. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  7. Tool Outfitters

    Joined:
    Nov 13, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the reply Michael. Yes, I have read that post numerous times and I still do not fully understand how memory works. To tell you the truth, I cannot even see the excessive memory usage in top when it occurs but I can certainly see it in the graphs. I just wanted to post how I remedied (not "fix" as I stated before) the issue so others would know.

    I did not get anywhere with the ticket I submitted so I am not sure I want to revisit it. All I know is that there is excessive memory usage when cpanel runs any type of function. It seems to me that it is using very little CPU thus putting a strain on memory usage.?

    The spikes you see in the above graphs are only from cpanel updates. I ended up doing backups once a week instead of the usual every other day because it was interfering with other crons that I have set up to run in the middle of the night. I am going to turn off updates and backups for a while and see what the results are.

    - - - Updated - - -

    I meant to post this in my previous post but it appears that I am unable to edit my posts. Here is my current memory usage.

    Current Memory Usage

    Code:
                 total       used       free     shared    buffers     cached
    Mem:       3572736    3070692     502044          0          0    2001520
    -/+ buffers/cache:    1069172    2503564
    Swap:      3572736     192512    3380224
    Total:     7145472    3263204    3882268
     
  8. Tool Outfitters

    Joined:
    Nov 13, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Well unfortunately there is no way to completely disable cpanel updates. The update check still runs and still consumes a great amount of memory.

    So again, my question is why does cpanel consume so much memory? It did not used to and even the documentation still states that the default cpanel max memory is 128MB. https://documentation.cpanel.net/display/1144Docs/Tweak+Settings

    Good luck trying to change this value lower than 512MB because it will not allow you to. What I don't understand is cpanel is obviously using more than 512MB of memory so why are the processes not being killed?

    So as it stands currently, you need at least 1GB of memory just for cpanel use. If I want to keep my performance up I will need to add more memory.

    {sarcasm}Thanks CPanel!{/sarcasm}
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you let us know the ticket number so we can take a closer look?

    Thank you.
     
  10. Tool Outfitters

    Joined:
    Nov 13, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Support Request Id 5202305 - Cron Backups

    The subjuect is Cron Backups but that was before I realized it was updates that was causing high memory usage as well.
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Just to clarify, are you experiencing actual performance issues (e.g. websites down, slowness), or is it just the statistics that show memory is utilized that concerns you?

    Thank you.
     
  12. Tool Outfitters

    Joined:
    Nov 13, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Performance (slowness, responsiveness). I can reboot the server and my websites will run great all day long but after updates/backups run, my sites become slow. It would also be nice if my backups only took 30 minutes to backup like they used to instead of 3 hours.

    - - - Updated - - -

    Why can't anyone explain why cPanel utilizes at least 1GB of memory?
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Essentially, what you are saying is that the cPanel memory limit for cPanel-related processes is not being properly enforced, and that cPanel is using more memory than it should. It's not something we can answer because it's not something that's been reported or is a known issue. This would be something that we would have to look into by examining your server. You would have to open a support ticket so we can take a closer look, as it was not brought up in the previous ticket you referenced.

    Thank you.
     
Loading...

Share This Page