What Is Error Code 429? How to Fix HTTP 429 Too Many Requests Error?

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...
Fix HTTP Error 429 Error

What Does HTTP Error 429 Mean?

HTTP 429 is a status code that tells the user that they have made too many requests within a limited amount of time and can’t make more requests at the moment.

Rate limiting is a mechanism that is employed by servers to control the rate of requests from a client or any activity to avoid or prevent bad / malicious activities.

It is observed when a certain client makes numerous requests to the server or API beyond a specific limit, often due to scenarios like scrapers, incorrect script configurations, or high traffic rates.

This error is designed to make sure that resources on the servers are fairly used as well as safeguard the servers from overloading due to many requests.

Whenever a 429 error happens, the server reacts by including a “Retry-After” header where the client responsible for sending requests is informed about the time period that you mention when it will not be locked out.

Acknowledging and effectively addressing this error is important to ensure web apps and services, which rely on external bars or are heavily loaded, run without issues.

Causes of Error Code 429 Too Many Requests Error

High Traffic Volume:

A number of requests that are sent in conjunction in a short amount of time can be concurrent requests and can cause the rate limit to be triggered and return the 429 error.

Automated Bots:

When a website or a set of requests is scanned by bots or an automated script the number of requests may surpass the available limit on the server resulting in the error.

This is common in cases such as when scraping data from a website, or hacking into the system.

Misconfigured Scripts or Applications:

Some applications or scripts that are not set up to first check the rate limits before making requests inadvertently overdo it.

For example, a script with looped requests to an API must contain time intervals to prevent such an error.

Also Read: What is HTTP 406 Not Acceptable Error? How to Fix It?

Poorly Optimized Code:

Code that is written poorly and takes too many unneeded requests will put too much work on the server.

This is so profound in cases where the application does not support caching of responses or is not efficient in making a large number of requests at once.

API Usage Limits:

Numerous APIs also control use and access to prevent misuse or limit the number of requests a user can input over a specific amount of time.

However, if an application goes beyond these predefined limits, the API server will politely deny all requests with a 429 status code to discourage the abuse of resources.

Brute-Force Attacks:

The login errors can occur because of login automation tools that attempt to guess the passwords over and over again, in which case the error is implemented as a security check that helps protect the server from any suspicious activity.

Also Read: What is HTTP 408 Error Code? How to Fix the 408 Request Timeout Error?

Rate Limiting by Proxy Servers:

However, it is crucial to note that if the website or application that returns a 429 is behind a proxy server then the proxy itself might limit the request rate and therefore return a Too Many Requests even if backend server itself has not put such a limitation in place.

Third-Party Services:

Normally the error arises when there are integrations with third party services that themselves have a rate limit.

For instance, by sending a large number of emails through an email service provider, one may get a 429 response from the provider.

DoS (Denial of Service) Attacks:

One of the ways possible is the intentional preparation of the maximum amount of requests which will cause a 429 status code as an attack.

How to Fix the HTTP 429 Error?

Use a Content Delivery Network (CDN)

A content delivery network is a system of servers that are put in different geographical locations across the world.

CDN works in such a way that when a user opens a site located on your server, the closest CDN server provides the necessary static files: images, css and js. This in turn cuts down the load on your web server and prevents instances of the 429 too many requests error.

A CDN solution, allows for the distribution of the static content across various servers and delivering the content to customers from the nearest server.

This will in turn help enhance the operational efficiency and reliability of your website especially during traffic peaks.

Optimize Your Database

A poorly optimized database means that your server will have to work overtime in order to pull information from the database and this may cause your site to use so much memory and resources that may lead to the 429 error.

To address this problem, it is recommended that you do all you can to work on your database in an effort to make it lighter.

To perform cleanup on your WordPress database, you can utilize plugins to delete any unwanted information found in the database, for example, post revisions, spam comments and transient options.

The Speed Optimizer plugin is open for all the clients, and it contains such an option as the Scheduled Database Maintenance that removes junk data in the database after one week.

Speed Optimizer

They can activate it by going to the Speed Optimizer menu in the WordPress dashboard; in the Environment tab, press on the EDIT tab under the Scheduled Database Maintenance feature.

Upon clicking in the next pop-up window, specify the actions that the maintenance should accomplish and click on CONFIRM.

Database Maintenance Options

Furthermore, you are able to repair your database tables and tune up your tables with the help of some features under the phpMyAdmin interface.

Phpmyadmin

Use Rate Limiting on the Client Side

Preventing the HTTP 429 error is quite simple and simple and one of the ways is by practicing rate limiting from the client side. Rate limiting is a mechanism which limits the number of requests that a client is allowed to send in any given duration of time.

Some people use available libraries or frameworks that contain rate limiting functionality or develop special rate limiting in their application.

For example, you can set a limit on the number of requests a client can make within a given period (e. g., a client cannot make more than 100 requests in ten minutes) and lock the further requests or respond to them after a much longer time than it takes to serve the typical request.

These aids help avoid the situation where clients make more requests to a particular server that can cause it to crash.

Change Your Default WordPress Login URL

A brute force attack is an attempt by some bots to login into a website with different username and password in quick succession and this leads to the 429 error.

If you mask the WordPress login URL or if you shift your default WordPress login page, then you can increase the security of WordPress admin.

Custom Login Page WordPress

Thus, with the help of the plugins like Security Optimizer, you can easily change the default login URL to the URL of your choice. This decreases the chances of bots identifying and attacking the login URL in order to cause the 429 error.

Switch to a Default WordPress Theme

If you modified your website recently or introduced a custom theme to the word press site, it is possible that the change is causing reorganized user or server related requests, leading to the occurrence of 429 error.

In such circumstances, it may be useful to switch to a standard theme so that a solution for the problem can be found. Try to switch to another WordPress theme, like the default ones like Twenty Twenty-One or Twenty Twenty, and then check if the error is there.

WordPress Theme

If the error disappears, then it most likely was in the previously active theme. Experience any problems with the conflict or performance related to your custom theme.

If it is the case then you should investigate the problem, try to solve it if possible otherwise you should use some other theme.

Clear Your Browser’s Cache

Any temporary or cached data that your browser has is prone to be old or corrupted hence leading to numerous problems, specifically the 429 HTTP status code when loading web pages.

Such problems can easily be fixed by clearing the browsing cache and this will help in loading the latest version of the site.

Usually, clearing the cache is possible from the settings of your browser. Consult, tips and procedure on how to clear cache for a certain browser or for a certain device.

Flush Your DNS Cache

DNS cache maintained at the local system which contains the information in the form of domain name and IP address mappings.

If the DNS cache is changed or if the DNS has new information and it is different from the cached one, there can be problems with accessing the website leading to the 429 error.

Clearing the DNS cache on your computer removes any cached DNS records from the local system and can help solve any problems relating to DNS cache.

Limit Brute-Force Attacks

When performing a brute force attack, attackers are likely to make several requests to a server within a given time frame, and this will lead to HTTP 429 error response.

Use appropriate login alerts/notifications for monitoring and/or preventing unauthorized or illegitimate logins, for instance put on CAPTCHA or reCAPTCHA to your website’s login access page.

Limit Brute Force

CAPTCHA involves users taking a challenge in order to demonstrate that they are not a robot and reCAPTCHA utilizes an organization’s machine learning algorithms in identifying and preventing human login impersonation.

Specifically for WordPress websites, to enhance the use of reCAPTCHA to guard pages, there are plugins such as reCaptcha by BestWebSoft.

Check for Server Resource Limits

Error 429 “Too Many Requests” occurs generally due to rate limiting which means that your site uses more resources that are allowed by your host provider.

These limits may include the amount of CPU usage that is permissible, the amount of RAM that may be used and the amount of concurrent connections allowed.

This could be addressed by checking on the available server resource restrictions and adjusting in case they are too restricted.

This information can be obtained by contacting the hosting company or by checking the control panel of the hosting account.

If you are on a shared hosting account, try to move to a better or a more adequate hosting plan for your website’s needs.

Check the Access Logs and Block suspicious IP Addresses

Quite often, the HTTP status code 429 is returned due to the presence of bots, spam, or other unauthorized guests with a specific IP address.

In your account’s control panel, check the access logs and blacklist the IP addresses behind the spamming.

Once you have confirmed a suspicious IP, you isolate it from your website under Security > Blocked Traffic.

Block Traffic

In the IP/IP Range field, enter your IP address and click on the Block button.

Temporarily Deactivate All of Your WordPress Plugins

The HTTP 429 error could also be caused by a misconfigured plugin in wordpress. If the error does not stop you from accessing the plugins backend, log in and go to Plugins – Installed Plugins.

Deactive Plugin

Ensure the plugins are all disabled, then enable them successively to determine the adverse plugin.

Conclusion

Enhance the protection of your site and get the definite trust of the clients with CheapSSLWeb! You are offered the diversity of cheap SSL certificates which guarantees the highest level of security for your information. This makes installation very easy and effortless so you are able to concentrate on what makes you money, your business.

Janki Mehta

Janki Mehta

Janki Mehta is a Cyber-Security Enthusiast who constantly updates herself with new advancements in the Web/Cyber Security niche. Along with theoretical knowledge, she also implements her practical expertise in day-to-day tasks and helps others to protect themselves from threats.