Too Many Requests
The user has sent too many requests in a given amount of time (rate limiting).
Root Cause
The client exceeded the API rate limit. Common in public APIs, authentication endpoints, and payment processors.
How to Fix
Implement exponential backoff and retry after the time specified in the Retry-After header. Reduce request frequency or upgrade your API plan.
Quick Summary
429 means the client has been rate limited. Check the Retry-After header for when to retry. Implement exponential backoff in your client. Common on authentication endpoints and public APIs.
Key Takeaways
- Check the Retry-After header for the wait time before retrying
- Implement exponential backoff: wait 1s, 2s, 4s, 8s between retries
- Rate limiting protects APIs from abuse and ensures fair usage
- Cache responses to reduce the number of API calls
When to use it
- Exceeding GitHub API rate limits
- Too many login attempts
- Exceeding Stripe API rate limits
Common Mistakes
- Retrying immediately without waiting, this makes the rate limiting worse
- Not implementing exponential backoff, linear retries can still overwhelm the server
429 Too Many Requests, Frequently Asked
How do I implement exponential backoff?
Wait 2^attempt * base_delay milliseconds between retries: attempt 1 = 1s, attempt 2 = 2s, attempt 3 = 4s, etc. Add jitter to prevent thundering herd.
Still having issues?
Check your network logs or use our developer tools to inspect headers, decode tokens, or validate your requests.