Hi,
I’m working with the Jira Cloud REST API using a developer account, and I’m trying to understand how rate limiting is enforced.
According to the documentation, I expect headers like X-RateLimit-Limit, Retry-After, and X-RateLimit-Remaining when approaching the limit. However, I noticed that:
- These headers do not appear in the response
- Even when making large numbers of requests, I don’t receive a
429 response
- In some cases, I get generic
5XX errors (e.g., 503), possibly due to throttling
Can anyone confirm:
- Are these rate limit headers supposed to appear for every request?
- Do developer/free accounts have different throttling behavior?
- Should I implement retry logic for both
429 and 5XX responses?
Thanks in advance!
Refs:
Hi @TomerMalache ,
I believe why this happens is due to the layers involved in implemented APIs and the unfortunate inconsistencies between them. Jira APIs are protected by rate limiting, but additional protection may occur lower down such as at the database level which is where I suspect the 503 errors are coming from.
I think the best overall strategy is to follow the pattern outlined in the rate limit response handling pseudo code. You may want to change the line } else if (statusCode == 429) { to } else if (statusCode == 429 || statusCode == 503) {.
To answer your specific questions:
- Are these rate limit headers supposed to appear for every request?
Yes, but unfortunately they may not.
- Do developer/free accounts have different throttling behavior?
I don’t believe so.
- Should I implement retry logic for both
429 and 5XX responses?
I would say yes for 503 errors, but some other 5XX errors may not be for transient reasons so the retries are highly likely to fail with the same errors.
Regards,
Dugald
What about to put 503 into rate limit response handling pseudo code as you have suggested?