There are a few feature-request for mysql-quota / adding the db-size to the webquota with a lot of votes. In the master-branch is already a function to gather the db-size for a database so this can (easily) be integrated (currently this function is used by the monitor-tool to display the db-size for all (mysql)-databases). But I don´t know how to handle a database (or website, too) which exceed the quota. 1. disable the db - bad idea, the client can´t reduce the db-size to get the limit back to "ok". 2. disable write-access for the db-user - see above 3. disable the correspondig website - the db-size could grow anyway I thinkyou can only send warnings if the size reached the defined limit. Any comments?
It would be great if you could implement that in master branch based on the already implemented mysql database quota stats. I think that warnings by email are the best alternative. It would be good if they can be configured under System > Server config > web. e.g.: [X] Send DB quota warning to admin. [X] Send DB quota warning to client.
I can add this to the master-branch. Do you think it´s better to add the database-size to the internal web-quota (may disable the website) or virtually add the database-size to the web-quota and send a mail if the limit is exceeded?
I would prefer it to add a new quota for mysql in the client limits and then check against that. The reason is that that harddisk usage can have different costs for a ISP. Example: A ISP wants to provide fast databases for his clients, so he uses a SSD raid for his database server while he uses a normal harddisk raid for his webservers. The price for 1MB Diskspace on a ssd aeeay is much higher then of a harddisk. So this ISP might give his users 500MB space for databases but 10GB for the website files. If you add the mysql usage to the web quota, you will not be able to differntiate that. And a large mysql database will cause more CPU ressources as well, when compared to the same amount of used diskspace for e.g. image files.