429 error on cPanel caused by a MySQL overload: what to do?

Procédure

Error 429 caused by MySQL overload appears when your site’s requests to its database exceed the limits of your cPanel hosting plan: the server then temporarily suspends your account’s web traffic to protect itself. This is not a failure.

An error 429 can also have other causes (see Reading your cPanel logs when a visitor is blocked): first check in your site’s access log that it really comes from MySQL overload, then follow the steps in this guide to lighten the database.

Confirm that error 429 comes from MySQL overload

Not all 429 errors come from MySQL overload. Before changing anything, check the cause in your site’s access log: each request blocked by MySQL overload has a specific note there.

  1. Open the access log

    In cPanel, under Metrics, click Logs, then Access Log. On the line for your domain name, click View. Logs for previous days are listed further down, under Archived log files.

  2. Search for the MySQL overload note

    In the Search field, enter MYSQL-DATABASE-OVERLOADED, then click Filter. A request blocked by MySQL overload appears on a line with code 429 and the following note:

    Expected result
    MYSQL-DATABASE-OVERLOADED:TRUE
  3. Read the result

    If the 429 lines include this note, the error really comes from MySQL overload: continue with the rest of this guide.

    If the 429 lines do not include this note, error 429 has another cause and the steps in this guide will not fix it: contact support and provide the time of the error and the address of the affected page (see “Common issues”).

Understand the mechanism behind error 429

On shared hosting, MySQL database resources are shared between several hosting accounts. When an account’s SQL queries exceed the limits of its plan, the server temporarily suspends that account’s web traffic to preserve overall stability.

  • The block lasts as long as the database exceeds the limits: the situation is checked again every 5 minutes.
  • The block is lifted as soon as a 5-minute period passes without any excess.
  • If the database is still over the limits at the time of the check, the block is extended by 5 minutes.

Distinguish between the different resource errors

Error 429 caused by MySQL overload should not be confused with other common limitations on your hosting:

For all other errors, find the request in your logs with Reading your cPanel logs when a visitor is blocked.

See database log overages

Database overages can also appear in a second cPanel log.

The Resource Usage page is not the right tool for this issue: it only shows MySQL CPU and disk (I/O) usage when it is measured in throttling mode. The rest of the time, the displayed usage does not include MySQL usage.

In cPanel, under Metrics, click Logs, then Database. This page may show overages or indicate No data available in table. An empty page proves neither the presence nor the absence of a block: the Access Log remains the reference.

cPanel database logs

Resolve MySQL overload step by step

Common causes explain these activity spikes: an inactive cache, a recently installed plugin or theme, heavy scheduled tasks, aggressive crawlers, or a sudden spike in visits. Follow these steps in order and stop as soon as the site is stable.

  1. Check that Fastest Cache is enabled

    Under Performance, click Fastest Cache. If the status shown is Enabled, do not change anything. If the status is inactive, click the Enable cache button. The General use mode is the default configured mode. To learn the specifics of each mode, see Fastest Cache: speed up your site with Varnish and NGINX. If you use WordPress, the LWS Optimize plugin, compatible with Fastest Cache purging, complements the server cache.

    Make sure Fastest Cache is enabled on your domain to ease the load on the web server and database.
  2. Back up the database via phpMyAdmin

    Before any intervention or deletion, create a backup copy. In the Databases section, open phpMyAdmin. Select your database in the left pane, click the Export tab, choose the Quick method in SQL format, then click Export. For details of the steps, see How do you manage MySQL databases with phpMyAdmin in cPanel?.

    phpMyAdmin: the database is selected in the left pane, then the “Export” tab is open (export of this database only).
  3. Open the LWS Protect tool

    Under Security, click LWS Protect, then click the Customize button on the line for your domain name.

    cPanel › Security › LWS Protect: domain list and “Customize” button.
  4. Configure bot filtering

    Open the Bots tab. Note the initial state of the options: by default, only the Block fake bots rule is On, while the other three are Off. Depending on the requests observed, you can switch Block/limit SEO bots or Block malicious bots to On. Blocking SEO bots can, however, interfere with your own external tracking tools such as Ahrefs or Semrush.

    LWS Protect › Customize › “Bots” tab: “Block/limit SEO bots” and “Block malicious bots”.
  5. Save the filtering rules

    Scroll to the bottom of the page and click Save changes to apply the new filtering. To cancel this filtering in case of unwanted blocking, simply switch the modified rule back to Off and click Save changes again.

    Bottom of the “Bots” tab: “Save changes” button.
  6. Block specific bots via the .htaccess file

    To block AI bots or tools not filtered by the firewall, open the File Manager in the Files section, then go to the public_html folder. Click the Settings button at the top right and check Show Hidden Files (dotfiles) to make the .htaccess file visible. Right-click .htaccess, choose Copy, and name the copy .htaccess.bak. Then check the existing content before adding your blocking rule, and save the file.

    cPanel File Manager showing the contents of the public_html directory with the .htaccess file

Check that everything works

After your adjustments, the block is lifted as soon as a 5-minute period passes without any excess. Then open your domain in a web browser: the site should display normally and without interruption. You can also check in the Access Log that no new line contains the note MYSQL-DATABASE-OVERLOADED:TRUE. The Database log may remain empty: this does not prove the absence of a block.

If your site displays normally again, without an error 429 page, the suspension has been lifted.

Common issues

The 429 lines in the access log do not contain the note MYSQL-DATABASE-OVERLOADED:TRUE

The 429 error is then not caused by the MySQL overload described here, and the steps in this guide will not fix it. Find the request in your logs with Reading your cPanel logs when a visitor is blocked, or open a support request from your customer area indicating the time of the error and the address of the page concerned.

My site gets error 429 again a few minutes after coming back up

A background scheduled task, a heavy plugin, or automated requests are restarting excessive activity as soon as the block is lifted. In cPanel, check your schedules under Cron Jobs, disable recently added CMS plugins or themes, and enable bot-blocking rules in LWS Protect.

The Logs > Database page stays completely empty

The screen sometimes shows the English message No data available in table. The page may remain empty: this proves neither the presence nor the absence of a block. Rely on the Access Log: requests blocked by MySQL overload bear the note MYSQL-DATABASE-OVERLOADED:TRUE there.

Error 429 persists despite optimizations

Log in to your customer area by following How to log in to your LWS account and solve login problems? and open a support request with technical support. Be sure to specify: the exact time the error 429 appeared, the full URL of the inaccessible page, the request ID displayed on screen, and the list of actions already applied (cache, firewall).

Related articles

help.lws.net/a/8176
Was this article helpful?

Yes

No

Read 2 times

Thank you! Feel free to ask questions about our documentation if you would like more information, and help us improve it.

Similar articles

Need more help?

A question about this article?

Léo, our assistant, answers you straight away based on our articles.

A problem with your account?

Our technical support team handles your request by ticket, from your customer area.

Open a ticket