Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

SOLVED The process “php-cgi” was terminated because the system is low on memory

Discussion in 'General Discussion' started by Toni La, Dec 29, 2016.

Tags:
  1. Toni La

    Toni La Registered

    Joined:
    Dec 29, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oslo
    cPanel Access Level:
    Root Administrator
    We run everyday a PHP script that updates our database from a xml file on same server. Everyday I recessiv the following email on 9:00 AM.

    Already updated max_execution_time =0, memory_limit=-1


    Original email form cpanel:
    Code:
    In order to avoid a system crash due to low memory, the kernel terminated the process named “php-cgi” with the PID “9406”.
    
    Server vps.xxx.com
    Primary IP Address 84.x.x.x
    Process Name php-cgi
    Event Time Thursday, December 29, 2016 at 6:09:43 AM UTC
    PID 9406
    Process UID 508
    Process Username xxxx
    Process Total Virtual Memory 3506024kB
    Process Anonymous Resident Set Size 3099256kB
    Process File Resident Set Size 30864kB
    Process OOM Score 715
    Status Out of Memory ⚠
    Memory Information
    Used 760 MB
    Available 3.05 GB
    Installed 3.79 GB
    Load Information 0.14 0.64 0.62
    Uptime 8 days, 15 hours, 49 minutes, and 15 seconds
    IOStat Information avg-cpu:  %user   %nice %system %iowait  %steal   %idle            5.77    0.33    2.18    1.48    0.02   90.22 Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn xvda             96.13       528.62       819.80  395492678  613338102 dm-0            142.34       523.10       814.38  391360980  609284784 dm-1              1.25         4.59         5.42    3433488    4051568
    Top Processes
    PID Owner CPU % Memory % Command
    1688 root 0.04 7.89 /usr/local/cpanel/3rdparty/bin/clamd
    8742 mysql 0.63 5.75 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/vps.xxx.com.err --open-files-limit=10000 --pid-file=/var/lib/mysql/vps.xxx.com.pid
    10961 root 26.98 0.50 tailwatchd - chkservd - spamd check
    10254 root 0.08 0.48 /usr/local/cpanel/3rdparty/bin/perl /usr/local/cpanel/bin/leechprotect
    10965 root 26.32 0.34 /usr/local/cpanel/scripts/restartsrv_spamd --check --notconfigured-ok
    
    
    For addtional details, see the attached dmesg log dump.
    
    
    
    Preview of “oom_dmesg.txt”
    [747859.520172] [10260] 99 10260 133288 881 1 0 0 httpd
    [747859.520176] [10288] 99 10288 133288 882 1 0 0 httpd
    [747859.520178] [10320] 99 10320 133288 884 1 0 0 httpd
    [747859.520181] [10440] 0 10440 25383 2860 0 0 0 tailwatchd - ch
    [747859.520184] [10443] 0 10443 13050 2730 0 0 0 /usr/local/cpan
    [747859.520187] [10444] 0 10444 9400 129 0 0 0 spamc
    [747859.520190] [10448] 0 10448 2353 124 0 0 0 xe-update-guest
    [747859.520192] [10449] 0 10449 2353 109 0 0 0 xe-update-guest
    [747859.520195] Out of memory: Kill process 9406 (php-cgi) score 715 or sacrifice child
    [747859.520212] Killed process 9406, UID 508, (php-cgi) total-vm:3506024kB, anon-rss:3099
    
     
    #1 Toni La, Dec 29, 2016
    Last edited by a moderator: Dec 29, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you provide some more information about this script? How large is the XML file? You may also find this third-party URL helpful:

    How to diagnose causes of oom-killer killing processes

    Thank you.
     
  3. Toni La

    Toni La Registered

    Joined:
    Dec 29, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oslo
    cPanel Access Level:
    Root Administrator
    Thanks, fixed by disabling Lfd excessive resource usage alert in ConfigServer Security & Firewall.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I'm happy to see you were able to address the issue. Thank you for updating us with the outcome.
     
Loading...

Share This Page