Skip to main content

MySQL Size Limit for Customers

Comments

14 comments

  • Infopro
    There is this setting; WebHost Manager "Server Configuration "Tweak Settings, SQL tab: Include databases in disk usage calculations
    0
  • Lucas
    If you do that apparently you lose full control of knowing the size of the user's mysql database through cPanel. Am I missing something here?
    0
  • Infopro
    I seem to have misunderstood you. DB size being tied to disk usage is what I thought you were after. I'm not sure you can set DB size limits more than that.
    0
  • A Hartonian
    This is probably an old post. But I am wondering how can I set a limit for mysql database size for customers. Sometimes we have users who abuses the hell out of the account. Their disk is 30GB which 2 GB is their website files and 15GB their database. This usage is intense for a shared server. Such scenario, 9 out of 10 are abusers. Usually feed reader websites that constantly post stuff from other websites. (Which is against our terms of use) Anyways, sometimes it gets out of hand. If its possible to set a size limit for the database most of troubles are resolved automatically. Legit users will never exceed 400 to 800 MB of database size on shared environment. In the past I've seen some hosters set this limit with cPanel but it seems I can't find any worthy documentation that offers such hack or solution. My Setup is: [LIST]
  • cPanel Dedicated
  • CloudLinux
  • Litespeed
  • Imunify360
  • Jetbackup
  • OSM I would appreciate if anyone can advice on this matter. (specially @cPanelLauren who is always helpful)
  • 0
  • cPRex Jurassic Moderator
    Hey there, @A Hartonian @cPanelLauren has taken a different position with the company and doesn't reply to forums stuff as much anymore, but I'll be happy to help! There currently isn't a way to limit the size of the database content alone in cPanel. If the user has a 30G account, they can use all 30G for the databases. There's an older feature request here:
    0
  • Handssler Lopez
    Hey there, @A Hartonian @cPanelLauren has taken a different position with the company and doesn't reply to forums stuff as much anymore, but I'll be happy to help! There currently isn't a way to limit the size of the database content alone in cPanel. If the user has a 30G account, they can use all 30G for the databases. There's an older feature request here:
    0
  • cPRex Jurassic Moderator
    CloudLinux has the MySQLGovernor tool here:
    0
  • CloudLinux Skhristich
    Hi everyone, Thanks @cPRex Yes, @cPRex is right, MySQL Governor allows to restrict customers who use too many resources. It supports the following only limits:
    CPU % CPU speed relative to one core. 150% would mean one and a half cores
    READ bytes bytes read. Cached reads are not counted, only those that were actually read from disk will be counted
    WRITE bytes bytes written. Cached writes are not counted, only once data is written to disk, it is counted
    0
  • KJ
    Hello, Sorry for bringing this thread up. Any changes so far? Is there a way nowadays to limit the MySQL account usage?
    0
  • cPRex Jurassic Moderator
    @KJ - you would still be able to use the CloudLinux MySQL Governor in the same way as described in this post, if you are using the CloudLinux operating system. There is no native way in cPanel to perform this work.
    0
  • KJ
    Yeah, i know... sadly MySQL Governor does not offer what we're looking for atm. I've already went ahead and commented on the feature request listed above. Ideally, we'd like to limit only the MySQL disk usage and not limit the way MySQL is being used by the client. While setting limits to MySQL usage is logical, it doesn't provide the results we want on certain setups. The way MySQL Governor operates now is causing (on occassion) lower page loading speeds to websites which are poorly optimized but pretty legit and not harmful. While it would make sense to ask the client to fix their website (from our perspective), from their perspective it is considered something unnecessary and a problem that another hosting provider could solve. Could we add the limit through the my.cnf file somehow?
    0
  • cPRex Jurassic Moderator
    Thanks for the clarification. I don't have any tools available that would take care of this. Even though that is an older feature request, I'll bring it up with the team next week to get some fresh eyes on it.
    0
  • KJ
    Thanks a lot!
    0
  • cPRex Jurassic Moderator
    Sure thing!
    0

Please sign in to leave a comment.