Skip Navigation
Expand
HTTP 429 errors on data import
Answer ID 12812   |   Last Review Date 04/09/2024

How do I avoid HTTP 400 and 429 errors when importing data through the Connect REST API?

Environment:

Connect REST, Connect Web Services for SOAP, Connect for PHP, ROQL (all versions)

Resolution:

The HTTP/1.1 429 Too Many Requests response happens when you attempt to hit the Connect REST API endpoint too many times in a single minute. This is usually a response when the server threshold believes you are being attacked with a DDOS attack. This is measured by taking the overall number of requests per second in consideration of your site's current availability as well as the number of threads open in the shared infrastructure.
 
Do understand all sites are on a shared dependency with a pod, thus your overall limit will be the number of open threads available on that pod. This means that you may have times where your number of allowed connections is higher then other, note these are database threads, thus this counts for the total operation of your entire B2C instance.
 
When the 429 request message is received, you will need to pause your requests for the suggested duration attached to the message. This can be done by iterating your requests, gradually increases the timeout to all for threads to become open. The answer below is in consideration of all CRUD processing, including Connect REST.