Skip to main content

HTTPd and PHP OOM - Out of Memory

Comments

4 comments

  • cPanelMichael
    Hello, You may find the following threads helpful when troubleshooting this issue: SOLVED - The process "php-cgi" was terminated because the system is low on memory Hang, Failed, Recovered and Out of Memory Let us know if this helps. Thank you.
    0
  • MrMatt
    Thanks Michael for the links I appreciated this command. ps -e -o pid,user,cpu,size,rss,cmd --sort -size,-rss | head Notable Results : Size in (kb) 4113 mysql - 8500944 /usr/sbin/mysqld 10511 named - 56472 /usr/sbin/named -u named 5300 root - 24000 /usr/bin/newrelic-daemon -c 4624 root - 442460 /usr/local/cpanel/3rdparty/bin/clamd 7798 nobody - 138296 /usr/local/apache/bin/httpd -k start 8002 nobody - 136508 /usr/local/apache/bin/httpd -k start What I am tracking is the mysqld service isn't good at releasing memory and is on a constant upward trend until oom killer is invoked. Do you have any information on MQL memory handling to reclaim this space back ? We have considered writing a memory monitor which restarts a service when it gets to a threshold level similar to oom killer yet with more variables and settings. Unless you'd consider this a waste if there is configuration for oom Killer ? Also want to carefully consider the impacts of implementing cloud Linux vs lightspeed as we are using some of the Apache modules.
    0
  • MrMatt
    Used the 'atop' -m for memory stats its very good. According to this tool we have 512MB swap and 0 free. For a server with 16 GB the recommended memory is higher does Cpanel have any guidelines ? Linux: Should You Use Twice the Amount of Ram as Swap Space? How do we safely increase the swap size ? our /etc/fstab : dev/xvda / ext4 discard,usrjquota=quota.user,jqfmt=vfsv0 1 1 /dev/xvdb none swap sw 0 0 none /dev/pts devpts gid=5,mode=620 0 0
    0
  • cPanelMichael
    Hello, Have you considered switching to MariaDB via "WHM >> MySQL/MariaDB Upgrade"? I've seen reports of improved memory performance when switching to MariaDB. Thank you.
    0

Please sign in to leave a comment.