On shared hosting, hosting accounts share a common database server (MySQL or MariaDB). If one account runs a very large number of queries or very resource-intensive queries, this can slow down the databases of all websites on the server. This is prevented by a component of CloudLinux called the MySQL Governor.
How does it work?
The MySQL Governor monitors in real time how much processor time and disk I/O each account’s queries are using. As long as the account remains within the permitted limits, nothing happens.
If an account exceeds its quota, the Governor continues to run its queries within the account’s own resource quota (LVE). The website’s PHP code also runs within the same quota, so the account’s database and PHP processes share the resource limits associated with its plan. If the load decreases, the restriction will be lifted automatically after a short time.
Depending on the server configuration, the Governor may interrupt SELECT queries that run for a very long time (for example, several tens of seconds). It does not interrupt other types of queries (insertions, updates).
What do you experience in such cases?
- Pages that use the database (such as WordPress pages or product lists in online shops) take longer to load.
- Due to slower queries, PHP requests take longer to run, which means the limit on the number of concurrent connections is reached more frequently, potentially causing a 508 error.
- On the cPanel Resource Usage page, database usage is shown as a blue line, whilst on the Snapshot tab, database queries running when the limit is reached are also displayed. Details: What do the fault counters mean on the Resource Usage page?
This restriction is not a penalty and does not affect the integrity of the data: it simply ensures that the database load of one account does not come at the expense of other websites.
How can you reduce the load on your database?
- Caching: the page cache serves most visits without the need for a database query. Tips: How can I speed up my WordPress site?
- Database maintenance: deleting unnecessary revisions, expired transient data and spam comments, as well as optimising tables. Detailed guide: Database optimisation for WordPress.
- Indexes: for in-house applications, create indexes on columns that are frequently filtered and sorted. If an index is missing, a query will scan the entire table.
- Resource-intensive plugins: statistics, log and search plugins often write to the database every time a page is loaded. Check which ones you actually need.
- Scheduled tasks: run large imports, exports and reports during off-peak periods; see: How do cron and SSH count towards resource limits?
If you are unsure which queries are causing the load, please contact our support team and we will help you find out.