Our NerdGraph API enforces a limit on concurrent requests per user.
Limit details
NerdGraph enforces a limit of 25 concurrent requests per user.
The rate of requests you make is not limited, only the number of concurrent requests.
Concurrency is tracked and enforced per user, not per user key. Requests made by the same user using multiple user keys will all contribute to that user's total concurrent requests.
We may allow more than 25 concurrent requests per user, based on the state of the system, but only 25 concurrent requests are guaranteed.
If requests are limited, they'll be rejected with HTTP status code 429
. As your in-flight requests complete and your total concurrency drops, new requests will automatically begin to succeed again.
Avoid hitting the limit
If you're making concurrent requests to NerdGraph in your code it's important that you limit the total concurrency client-side. For example, if you need to make 100 requests you could:
- Implement a pooling solution to ensure requests are only made when a concurrent connection is detected as being available.
- Send the requests in batches of 25 concurrent calls.
- Replace concurrent code with sequential code and only make a request after the previous request has completed.
For code examples related to implementing some of these recommendations, see NerdGraph Concurrency Tutorial
Be mindful of code run in multiple places at once. Even non-concurrent code will create concurrency if it's being run in multiple places.