This blog post will explain everything about the 429 Too Many Requests Error. From how it can occur, the reason for that, and the possible fixes. The “429 too many requests” is an HTTP response. It comes from the server when too many consecutive requests are sent to the server quickly. The server tells you “to stop sending requests” for a while and try again later. In this case, the client exceeded the rate limit set on a server level. The server must have these limits to prevent overload and unnecessary downtime.
The following paragraphs will explain the 429 Too Many Requests error and all the required steps for fixing it. Let’s get started!
Table of Contents
What is 429 Too Many Requests Error?
The 429 too many requests error is an HTTP response that belongs to the 400s HTTP responses. These are client-side problems. As the error message suggests, too many requests were sent to the server. The causes for this may be user requests, bots flooding the website, brute force (DDOS) attacks, plugins or custom scrips trying to access the website, or low server resources unable to handle an average number of requests in some time. When the server rate limit is reached, the server sends the HTTP 429 Too Many Requests message to the browser.
To fix the 429 too many requests error, you can follow the paragraphs below.
Fixing the 429 error as a client
Clear the Web Brower Cache: Clearing the web browser cache and cookies is always suitable for any HTTP 4xx error. To clear the web browser cache in Chrome, click on the three dots in the top right. From there, click on History and Clear browsing data. This way, the website’s saved information in the cache and cookies will be removed, which may solve the 429 error.
Flush the DNS Cache: Flushing the DNS cache is also on the client side since every local machine stores its DNS data in a local cache. This way, the website will load faster, which may sometimes lead to problems like this. So, flushing the DNS cache is recommended as well. To Flush the DNS cache in Windows, open the cmd as an administrator and execute the following command:
ipconfig/flushdns
To flush the DNS in Linux and MacOS, respectively, you can execute the following command in the terminal:
#Linux resolvectl flush-caches #MacOS sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Try Again Later: If none of the previous suggestions work, you should wait and try again later. The “HTTP 429 too many requests” error sometimes tells us how long we must wait to access the website. That is written under the Reply-After command. For example, if the Reply-After is 1800, we need to wait for 1800 seconds or 30 minutes for a website to be accessible. There is nothing that you can do on the client side except to wait for the given time.
Fixing the 429 as a server owner
Even the 429 too many requests belong to 4xx client-side errors. As a server owner, you can try a couple of steps. The following paragraphs will teach you some basic steps.
Rate Limit
Increasing the rate_limit value to a higher one may solve the issues. You can set the rate_limit and the number of requests a client can make within a certain period ( Example: 200 requests per 20 minutes) and block and delay further requests if the limit is exceeded. This will prevent the 429 too many requests error from appearing and will ensure the server is not overloaded.
Limit Login Attempts
A brute force attack is a common method that may lead to the 429 HTTP error. This means that attackers are trying to guess the password with hundreds of numerous attempts. This will drastically increase the requests, directly leading to the 429 Too Many Requests messages being shown on your website. To prevent this scenario, you can limit the login attempts on your website to a specific number and, after the limit, automatically block the user in the firewall.
Database Optimization
If the database is not optimized and is full of junk content, transient data, leftover tables, and bad queries, it can also lead to the 429 error. In other words, the unoptimized database can exhaust the server resources, resulting in the 429 Too Many Requests error message.
Malware Scan
Malicious scripts can cause significant damage to the root of the website’s documents, such as data breaches, system failure, and modification of permissions for files and folders that are easily accessible from outside. This will make the website accessible to attackers if the files have changed. It is always recommended to use anti-malware software such as ClamAV, chkrootkit, or rkhunter to scan the website files and remove the malicious if there are any.
Upgrade Hosting Package
If the current server resources are not enough to handle the traffic on your website and if the server overloads, you should consider upgrading to a higher hosting plan. After the upgrade, optimizations need to be made so that the website can rationally use the new resources.
Still cannot fix the 429 Too Many Requests Error?
If you followed the steps above, you should have successfully learned how to fix the 429 too many requests error.
Of course, if you have a unique issue or technical work isn’t your forte, you can always contact our technical support. You must sign up for one of our NVMe VPS plans and submit a support ticket. Our admins will check every server-related issue explained above. Do not hesitate to contact us anytime you want. We are available 24/7 via live chat and ticketing system.
If you liked this post about 429 too many requests error, please share it with your friends or leave a comment down below.