1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Resolve a 429 or 503 error (web server related)
This guide details errors of type "Rejected, too many connections from this host" that can occur when visiting a website.
Origin of Errors
429 Too Many Requests
This error occurs when the server is overwhelmed by a large number of requests in a short period, which can be due to heavy site usage or abuse.
503 Service Temporarily Unavailable
This error can be caused by several factors, including planned maintenance on the server, server overload due to high traffic, or the execution of a script that exceeds the server's resource limits.
Rejected, too many connections from this host
This error occurs when the server rejects connections due to a high number of simultaneous connections from the same IP address. Check the "Access and Error Logs" on your hosting dashboard to find multiple entries like:
[Fri Sep 02 11:40:31] [error] [client 222.111.123.123] Rejected, too many connections from this host. (vhost:domain.xyz uri:/js/modules/blocktopmenu/js/superfish-modified.js current:34 limit:30
[Fri Sep 02 11:40:31] [error] [client 222.111.123.123] Rejected, too many connections from this host. (vhost:domain.xyz uri:/js/modules/blocktopmenu/js/hoverIntent.js current:34 limit:30
[Fri Sep 02 11:40:31] [error] [client 222.111.123.123] Rejected, too many connections from this host. (vhost:domain.xyz uri:/js/modules/productscategory/productscategory.js current:34 limit:30
[Fri Sep 02 11:40:31] [error] [client 222.111.123.123] Rejected, too many connections from this host. (vhost:domain.xyz uri:/modules/feeder/rss.php current:35 limit:30
[Fri Sep 02 11:40:31] [error] [client 222.111.123.123] Rejected, too many connections from this host. (vhost:domain.xyz uri:/js/modules/favoriteproducts/favoriteproducts.js current:34 limit:30
In this example, the IP 222.111.123.123 is making 30 simultaneous connections on each page, so it's automatically rejected as it may appear as an attack or scan.
Resolution Steps
Some steps to resolve these errors:
- Check scripts that make multiple connections to the server to display data.
- Optimize the concerned script(s) to require fewer resources.
- Increase the limits of the affected site to allow the script to do what it needs to and/or limit the number of simultaneous connections (especially on a Cloud Server where limits -memory, execution time, simultaneous connections- can be significantly increased).
- Migrate your hosting to a Cloud Server.