Results 1 to 12 of 12
  1. #1

    Question How to limit cpanel hosting accounts by cpu/memory?

    Does anyone know how to do this?

    I know bluehost.com "sort of" does this. If you use more then x % of the total CPU or memory of the server, then your account will be limited automatically.

    (A page is displayed saying that the page you're trying to view can't be displayed because it is using too much resources.)

    Does anyone know how they do this?
    We are eNom PLATINUM PLUS resellers!
    Sign up today for an eNom.com reseller account with lowest possible pricing.
    * We provide support and service to over 4275 happy eNom domain name and SSL certificate resellers!

  2. #2
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,771
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  3. #3
    Join Date
    Jun 2006
    Location
    Cluj Napoca
    Posts
    469
    It's hard to detect a user that will use x% of the total CPU or memory (excluding cgi and other things that he will run from his user, you can limit that with ulimit for example). An ideea is to check apache status regulary and do some math with the results, set a query time limit and check the logs, you can do that automatically mysql has some tools to sort the result a.s.o. I do not think there is an easy way to do it.
    IntoDNS - Check your DNS health and configuration
    FLEIO - OpenStack billing and control panel for service providers

  4. #4
    Join Date
    Jun 2006
    Location
    Cluj Napoca
    Posts
    469
    RLimitMem:
    This applies to processes forked off from Apache children servicing requests, not the Apache children themselves. This includes CGI scripts and SSI exec commands, but not any processes forked off from the Apache parent such as piped logs.

    Same with the other one. It's ok to do that, but the bigger problem is to limit accounts that lead to high load because of some long mysql queries and too many apache processes.
    IntoDNS - Check your DNS health and configuration
    FLEIO - OpenStack billing and control panel for service providers

  5. #5
    Looks like hsphere can do this on a per-account and per-plan basis:

    http://www.psoft.net/HSdocumentation...resources.html

    We're using cpanel, but all our servers run PHP as a CGI (using phpsuexec).

    My understanding is that with this setup, using rlimit in each customer's virtual host will effectively limit all the customer's activity, including php/mysql/apache?
    We are eNom PLATINUM PLUS resellers!
    Sign up today for an eNom.com reseller account with lowest possible pricing.
    * We provide support and service to over 4275 happy eNom domain name and SSL certificate resellers!

  6. #6
    Join Date
    Jun 2006
    Location
    Cluj Napoca
    Posts
    469
    It will not include apache/mysql. It will include cgi's as it says in the link. cgi's are easy to limit but with that you cannot limit mysql usage or apache usage (load created when serving a page). It will include the php process if it will be executed as cgi. It's a start but far from being what you want.
    IntoDNS - Check your DNS health and configuration
    FLEIO - OpenStack billing and control panel for service providers

  7. #7
    i dont know if that help ,

    but in order to make daily CPU / RAM consumption available for my Cpanel users I make simple script shell that create daily file named : <login>-cpu.html , and put it in user public_html .

    The script is available at :

    http://50dh.info/create-daily-cpu-peruser.txt

    you can easily add suspension if limit are raised ,

    any improvements are welcome .

  8. #8
    Hi @mrzippy

    Please let me to share my ideas..

    If you want to tweak overall cpu limit, you can use @david510, @50dh and @Cristi4n ideas, or if you hard to understand that tweaks technically, you can install ConfigServer Firewall and edit the cpu limit configuration.

    Otherwise if you want per user limitation, you can use CloudLinux + cPanel and you can ask support from them.

    Thank you so much

  9. #9
    Join Date
    Jan 2003
    Location
    SLC
    Posts
    2,278
    50dh & HOST QuickBuys you guys realize this is a 5 yr old thread

    you brought it back from the dead
    just install cloud Linux & be done with it

  10. #10
    Uh, i am so sorry @HostingBig, i did not notice the that date.. i only read the last post and the top of this thread, if what is the OP issiues...

    Sorry....

  11. #11
    Join Date
    Nov 2004
    Location
    Australia
    Posts
    1,737
    This is exactly what CloudLinux does, I'm surprised nobody seems to have commented on it.

    We don't use it, so I can't comment other than to say what I seem to be hearing is all good.

  12. #12
    Quote Originally Posted by brianoz View Post
    This is exactly what CloudLinux does, I'm surprised nobody seems to have commented on it.

    We don't use it, so I can't comment other than to say what I seem to be hearing is all good.
    Probably nobody commented on it, because I started this topic in 2007...


    Mods, you can close this thread. Time has fixed this problem.
    We are eNom PLATINUM PLUS resellers!
    Sign up today for an eNom.com reseller account with lowest possible pricing.
    * We provide support and service to over 4275 happy eNom domain name and SSL certificate resellers!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •