CPanel CPU Suspend Works?

Started by ecayer, April 03, 2017, 10:33:42 PM

ecayer

Hello, is anyone using the plugin "CPanel CPU Suspend"
not sure how it works/config but we have been trying to set this up for weeks now.

Please shed some light on this matter.

hbillclient

#1
Hi,

What is the issue you are facing?

This should help you setting it up:

https://wiki.hostbillapp.com/index.php?title=CPanel_CPU_Suspend

Hope that helps.

Thanks.

ecayer

#2
Thanks for your response. I have followed the instructions but when i test module its always Not Present.
My hostbill is on another server so this maybe the issue.

ecayer

Anyone can help me to configure this plugin?

ecayer

Really need some help guys. I have a server that really needs this.
Please anyone? I am even willing to pay

d4f

I have never used the option as I think it's _far_ too brutal a solution. Suspending a full cPanel account including email, webdav and other services just because a script ran away?

I would strongly recommend you look into CloudLinux for your account limitation requirements as they are much better suited to webhosting needs and bring tons of other useful features too!

ecayer

Quote from: d4f on April 06, 2017, 03:26:54 AM
I have never used the option as I think it's _far_ too brutal a solution. Suspending a full cPanel account including email, webdav and other services just because a script ran away?

I would strongly recommend you look into CloudLinux for your account limitation requirements as they are much better suited to webhosting needs and bring tons of other useful features too!

Thanks but i am not looking into alternatives.  We are planning to use this to send client emails about usage not to suspend their account.
Sometimes its better to suspend one account than make all accounts go down.

d4f

#7
I'm not trying to convince you to use an alternative, but I will warn you that this solution is far from perfect and may cause you a lot more headache and angry customers than even not using it. Please do believe me in this regard, such a simplistic approach (get top current users, if he keeps appearing - suspend) was my first solution in high-density hosting too and it backfired quite spectacularly.

I learned -the hard way- that even when you have a 5-figure count of domains on a single server, you are still prone to banning the _wrong_ user because he happened to appear at the wrong spot in the CPU list at the wrong time while the actual culprits can go unchecked for _hours_.

Let's assume that the CPU usage goes way up because one user is running tons of database operations. He will have 0% usage because all the usage is done under the system user "mysql". Due to the high disk activity -and so high IOwait% - other users (especially Wordpress!) will take the top spot for seconds because their pages can't load properly. The system then sees those users as cause and bans them - but they didn't do anything wrong! Additionally this will only work for CPU usage, not for memory usage, Apache processcount or similar!

The only correct approach is to use Mysql's SHOW_USERSTATISTICS (which shows Mysql CPU usage) and Linux CGROUP system (which counts the user's real CPU time since start), both of which are fully incorporated in CloudLinux. It will send your customers warning emails if they exceed their plan's maximum power/RAM/... _and_ it will only block HTTP access with a error-500 code while the issue persists.

Please don't forget; if you are suspending a webpage because Google crawls it and causes high CPU load, Google will only see the suspend page and will NOT try again and may even kick the page out of it's index. Talk about happy customers then  :P

Disclaimer: I do NOT work for Cloudlinux or am in any way affiliated with them. Their products just made my day a LOT easier because much of the detection software I had to write and maintain before is now handled by their products.

tallship

Quote from: ecayer on April 06, 2017, 07:57:36 AM
Thanks but i am not looking into alternatives.  We are planning to use this to send client emails about usage not to suspend their account.
Sometimes its better to suspend one account than make all accounts go down.

You can always pay HostBill to do this for you.
Bradley D. Thornton - Manager Network Services, NorthTech Computer   TEL: +1.310.388.9469 (US) | +44.203.318.2755 (UK) | +61.390.088.072 (AU) | +41.43.508.05.10 (CH)
Registered Linux User #190795 - "Ask Bill why the string in [MS-DOS] function 9 is terminated by a dollar sign. Ask him, because he can't answer. Only I know that." - Dr. Gary Kildall.

ecayer

Quote from: tallship on April 11, 2017, 12:15:15 PM
You can always pay HostBill to do this for you.

Thanks for your help and advice, could not have thought about this without you ???