skip to Main Content

I have a VPS with firewall and security notices enabled. I keep getting emails like this:

Time:         Wed Jun 19 19:01:54 2019 -0500
Account:      user
Resource:     Process Time
Exceeded:     7248 > 3600 (seconds)
Executable:   /opt/cpanel/ea-php72/root/usr/sbin/php-fpm
Command Line: php-fpm: pool domain_com                           
PID:          16374 (Parent PID:9915)
Killed:       No

So for some reason with this example I have a script that has apparently been running for 2+ hours non-stop. I don’t have anything that should be doing that.

I’m getting notices like this quite often. How can I use this info to track down what specifically is causing this?

Any information would be greatly appreciated. Thanks!

2

Answers


  1. To get more information on processes, I would use the Htop tool. This is a great article for learning about how to manage processes using htop and ps

    Lsof (List open files) will tell you more information about what files the process is using.

    You can get htop and lsof with

    sudo apt install htop lsof -y
    

    This article indicates that :
    That message comes from the third-party CSF/LFD application and indicates a PHP-FPM process was running longer than the maximum time configured for the CSF/LFD detection period. It shows the process was not killed, thus you should not have traffic loss.

    So you might want to check the PHP-FPM error log for the account in-question to see if you notice any particular error messages. It’s located at:

    /home/$username/logs/domain_tld.php.error.log
    

    It looks like your specific issue has not been resolved on that form. So, you might want to try strace. It handles watching system calls made by a given process including all read-write operations and os function calls. You can activate it on the command line before the program you want to track or attach to a running process by hitting s on a process selected in htop.

    Login or Signup to reply.
  2. You can track which the exact process with the process ID mentioned.

    lsof -p 16374
    

    The alert which you are getting is from the LDF which is installed as a part of CSF. I think its normal for cPanel with php_fpm to have the process php_fpm run this long.

    You can add the php-fpm to csf.pignore file to stop this warning.
    You can also refer the below cPanel fourm thread.
    https://forums.cpanel.net/threads/lfd-excessive-resource-usage-normal-for-php-fpm.592583/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search