How to limit CPU usage per cPanel account?
I'm managing a server that hosts many Wordpress sites and some of them are seemingly made by "developers" that don't use caching plugins, do not rewrite the wp-admin.php script location, etc... and the worst thing is that some of those under optimized WP sites are very popular (by both humans and robots) so some days there are 15-20 index.php requests at once and since they're not cached, the CPU usage goes flying at 1000% and sometimes 2000% (yes, 2 thousand percent). I've even seen CPU usage go to 80.0 at some point and I couldn't even sign in to WHM at all, it would time out with an error 500. It's really bad.
Is there a tool in WHM to prevent a single cPanel account from bringing a WHM server down to its knees? I'm looking for a way to set for a given account: Limit CPU usage to 1.0 or something like that.
All I could find are posts from 2004, 2008 or 2010 asking the same thing so surely, in 15 years, WHM has evolved, hasn't it?
-
But that implies that I have to reinstall or upgrade the whole OS which could break other web apps that are hosted on this server... 0 -
CloudLinux is a drop-in replacement for CentOS or AlmaLinux, so you don't need to change anything on the server side. 0 -
Wait, CloudLinux is another paid hosting solution that goes on top of my hosting solution? Wait, what? 0 -
Yes, CloudLinux is a paid operating system, which cPanel runs on top of. There are no built-in tools in cPanel that perform the tasks you mentioned. 0 -
It's not a "hosting solution", it's more like an extension that " improves server stability, density, and security by isolating each tenant and giving them allocated server resources." We have CloudLinux in all our servers and I would not run a shared server without it. 0 -
I do not run a shared server and I would have expected WHM to provide a tool to mitigate CPU usage per account, especially when this feature has been asked by WHM customers for nearly 2 decades. Bare metal WHM costs us 50$/month. 0 -
While you may not call it a shared server, if you're running a server where you didn't install and configure every site yourself, and "that hosts many Wordpress sites and some of them are seemingly made by "developers" that don't use caching plugins" you're running a shared server. 0 -
To me, a shared server is one that is not dedicated, or in other words, one that you do not have root access to. 0 -
From Wikipedia: "A shared web hosting service is a websites reside on one web server connected to the 0 -
Who runs a whole server for themselves just to have a single website on it? That is crazy. And what is the point of WHM compared to cPanel? I thought WHM was exactly for managing a server that had more than 1 website. Otherwise, why bother with WHM on a dedicated server in the first place? That would serve absolutely no purpose. 0 -
Because in a server (usually a VPS) with root WHM access you have full control of the whole server, CloudLinux has CloudLinux Solo for that kind of use. 0 -
@Benjamin D. - MANY servers have only one website. It just depends on what level of control and how many resources they need. 0 -
Good convo chaps. I would like some basic tools for managing resource control but I am not wanting to move to cloudlinux (had a lot of bad experiences with them in the past and don't care to repeat the episodes).
So was looking into mod_ratelimit and also wondering what other options to slow down maximum requests per virtual host in say, 50 second bursts.....
0
Please sign in to leave a comment.
Comments
14 comments