On a Linux VPS with cPanel you may be alerts along the lines of the following:

Time: <some specific time>
Account: <Your cPanel user account>
Resource: Virtual Memory Size
Exceeded: 218 > 200 (MB)
Executable: /usr/bin/php
Command Line: /usr/bin/php /home/your_site/public_html/index.php
PID: <some_number>
Killed: No

This alert is an informational message. How you deal with these are a matter of personal preference and needs of your organization.

There is a daemon on your VPS, the lfd daemon, that will monitor processes and if a process' memory usage exceeds a defined threshold (in this case of the example above, 200MB), it sends an alert. That is all that is happening here. The server has no way of knowing if this is expected behavior or not, so it just sends an alert so the owner can decide whether to investigate.

So, if the threshold is set to 200MB and a script or process uses more than 200MB memory, you will get an alert containing the name of the script, the time it occurred, and the amount of memory that it is consuming.

Here are some options you may want to consider for how to deal with these. This is not an exhaustive list but should give a good starting point.

  • The first option is to do nothing. When you get the alerts, glance at them and see what script or process is triggering the alert. If your VPS is running particularly sluggish and you are getting alerts about a PHP script consuming large amounts of RAM, you can consider killing the script to return the server to normal responsiveness. Likewise, if you write some script and start getting alerts about the amount of RAM it is consuming, that might be a heads up to you that your script has problems.
  • Increase the memory threshold for the alerts from 200MB to say 300MB. That will allow scripts and processes to consume more RAM before they trigger the alert. If you want to increase it much higher than 300MB, then you might be better off just turning this feature off alltogether (see the next option).
  • Turn off this feature entirely. If you are not interested in knowing when a process exceeds a defined threshold, then there is no need to get the alert and it can be turned off.

To change the threshold that LFD alerts on:

  1. Log into WHM of your VPS at https://<your VPS IP address>:2087 with the root account.
  2. Go to ConfigServer Security&Firewall --> Firewall Configuration
  3. Change the value for PT_USERMEM to the threshold you want to report on.

To turn off this feature, set the PT_USERMEM paramter to 0.

There are other options but are only recommended for advanced users. Click here for more details.