Auto Kill Processes with High CPU Usage

OCS

Registered
Aug 25, 2018
4
0
1
Poland
cPanel Access Level
Root Administrator
For some time now we have a certain account which always excels and uses up most of all server resources.. Often all other websites running on the server experience some downtime due to these high CPU uses by this account.. After killing these processes manually everything returns back up to speed.
This account has really nothing special going on.. It's a simple eCommerce store with limited functionalities so I can't think of anything that would be using up so many resources.
I've attached a screenshot of the processes.. There you can see that php-fpm for this account eats up all the resources everytime again...

I would to know if there is a possibility in WHM to auto kill processes which take up more than X% of the CPU.
 

Attachments

ES - George

Well-Known Member
PartnerNOC
Jun 12, 2011
178
25
78
UK
cPanel Access Level
DataCenter Provider
Twitter
Is it a client account? If so, I can't help but think they may get upset if the execution of their web pages suddenly gets cut short.

A better option would be to investigate the cause of the high CPU usage. For example, bots could be bombarding a contact form that has no CAPTCHA. Or there might be some simple settings changes that can be made.

If you don't wish to install CloudLinux to help throttle resources automatically, the only other option would be to move that particular account to a new server.

I know this doesn't answer your question about auto killing a process, but I figured this may be of help nevertheless.
 

OCS

Registered
Aug 25, 2018
4
0
1
Poland
cPanel Access Level
Root Administrator
@ES - George, I very much appreciate the reply and suggestion.
This particular client will not/can not get upset about any short comings. This due to certain agreements.

Your reply about CAPTCHA forms made me think..
After checking it seems that this account (website) actually does not have any captcha secured forms active.
I've now enabled captcha and am very curious about the results..

I will certainly post them in the upcoming days. Thanks again.
 
Last edited by a moderator:

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
I agree that CloudLinux would alleviate the issue of them being able to consume a large amount of server resources by automatically throttling them and this is a widely suggested resolution for this type of issue.

I also agree that all efforts to understanding the source of the issue should be made as well. You can use the WHM>>Server Status>>daily process log to see the specific processes on average and the top processes on the server for the day. This should give you some hints for the user, the captcha idea is also fantastic and any login page for the site should have something like this implemented as well as brute force protection.