<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/why-you-re-getting-429s-in-production-and-how-to-stop-them-mhsytuyaf" -->

---
title: Why You're Getting 429s in Production and How to Stop Them
description: Getting 429 responses from Auth0 in production almost always traces to two root causes: calling the Management API on every request to fetch roles,...
canonical: https://daily.dev/posts/why-you-re-getting-429s-in-production-and-how-to-stop-them-mhsytuyaf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Why You're Getting 429s in Production and How to Stop Them | daily.dev
og:description: Getting 429 responses from Auth0 in production almost always traces to two root causes: calling the Management API on every request to fetch roles,...
og:url: https://daily.dev/posts/why-you-re-getting-429s-in-production-and-how-to-stop-them-mhsytuyaf
og:image: https://api.daily.dev/og/posts/mhSytUyaf.png
og:image:alt: Why You're Getting 429s in Production and How to Stop Them
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Why You're Getting 429s in Production and How to Stop Them

**[Auth0](https://daily.dev/sources/auth0)** · 6 min read · 0 upvotes · 0 comments

## Summary

Getting 429 responses from Auth0 in production almost always traces to two root causes: calling the Management API on every request to fetch roles, permissions, or metadata that should instead be embedded in the token, or fetching a fresh M2M token on every call instead of caching and reusing it (M2M tokens are valid 24 hours by default). The fix for the first is a Post-Login Action that attaches custom claims to the access token at login time, so the API reads from the JWT with no external call. The fix for the second is in-memory token caching with a 60-second expiry buffer. Data that must stay current mid-session (email verification, org membership, MFA status) should use a short-TTL server-side cache (30-60 seconds) rather than a live call. When a 429 does occur, retry using the deterministic x-ratelimit-reset timestamp rather than exponential backoff.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://auth0.com/blog/why-getting-429s-and-how-to-stop-them>

## Questions this post answers

### Why am I getting 429 errors from Auth0's Management API in production?

429s from Auth0's Management API almost always come from calling it on every incoming request to fetch data like roles, permissions, or metadata, which quickly exhausts the tenant's rate limit as traffic grows. The fix is moving that data into the access token at login using a Post-Login Action, so the API reads it from the JWT instead of making an external call per request.

_daily.dev surfaces practical fixes like this for developers debugging Auth0 rate limit issues in production._

### How long is an Auth0 machine-to-machine (M2M) token valid, and should I cache it?

Auth0 M2M tokens are valid for 24 hours by default and are meant to be cached and reused rather than fetched on every request. Fetching a new token per request adds latency, generates unnecessary traffic to the token endpoint, and can trigger rate limits; caching in memory with a 60-second expiry buffer before refetching is the recommended approach.

_Teams tuning token handling for Auth0 M2M flows can track patterns like this via daily.dev._

### How should I handle a 429 response with retries when calling Auth0's API?

Read the x-ratelimit-reset header, which contains the Unix timestamp of when the limit resets, and retry exactly after that time rather than using exponential backoff. Because the reset time is deterministic, exponential backoff only adds unnecessary delay for users without reducing the chance of hitting the limit again.

_daily.dev helps developers keep up with concrete API rate-limit handling patterns like Auth0's reset header._

## Similar posts on daily.dev

- [Why Server-Side Sessions Break at Scale — And How JWT Fixes It](https://daily.dev/posts/why-server-side-sessions-break-at-scale-and-how-jwt-fixes-it-nm5vga0tz) · Medium · 0 upvotes · 0 comments
- [3 AWS Cognito Gotchas](https://daily.dev/posts/3-aws-cognito-gotchas-8aittics4) · Atomic Spin · 2 upvotes · 0 comments
- [Revoke a JWT Before It Expires: Refresh Tokens and token](https://daily.dev/posts/revoke-a-jwt-before-it-expires-refresh-tokens-and-token-1wnroe8ld) · Milan Jovanović · 30 upvotes · 1 comments
- [Your chat bot needs a better rate limit strategy](https://daily.dev/posts/your-chat-bot-needs-a-better-rate-limit-strategy-3z5ej73qe) · thoughbot · 1 upvotes · 0 comments
- [How to Monitor Auth0 Usage Metrics](https://daily.dev/posts/how-to-monitor-auth0-usage-metrics-dchkty1xh) · Auth0 · 0 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#authentication](https://daily.dev/tags/authentication), [#jwt](https://daily.dev/tags/jwt), [#auth0](https://daily.dev/tags/auth0)

[View this post on daily.dev](https://daily.dev/posts/why-you-re-getting-429s-in-production-and-how-to-stop-them-mhsytuyaf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Why You're Getting 429s in Production and How to Stop Them","url":"https://daily.dev/posts/why-you-re-getting-429s-in-production-and-how-to-stop-them-mhsytuyaf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/why-you-re-getting-429s-in-production-and-how-to-stop-them-mhsytuyaf"},"datePublished":"2026-09-10T15:26:03.340Z","dateModified":"2026-10-15T02:22:56.278Z","description":"Getting 429 responses from Auth0 in production almost always traces to two root causes: calling the Management API on every request to fetch roles,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b80e696fac6b8532ecb911c837115d73?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b80e696fac6b8532ecb911c837115d73?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Auth0","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Auth0","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/6510ffa7350449618fbacdddae663b82","url":"https://daily.dev/sources/auth0"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/why-you-re-getting-429s-in-production-and-how-to-stop-them-mhsytuyaf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,authentication,jwt,auth0","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Auth0","item":"https://daily.dev/sources/auth0"},{"@type":"ListItem","position":3,"name":"Why You're Getting 429s in Production and How to Stop Them"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/why-you-re-getting-429s-in-production-and-how-to-stop-them-mhsytuyaf#faq","mainEntity":[{"@type":"Question","name":"Why am I getting 429 errors from Auth0's Management API in production?","acceptedAnswer":{"@type":"Answer","text":"429s from Auth0's Management API almost always come from calling it on every incoming request to fetch data like roles, permissions, or metadata, which quickly exhausts the tenant's rate limit as traffic grows. The fix is moving that data into the access token at login using a Post-Login Action, so the API reads it from the JWT instead of making an external call per request. daily.dev surfaces practical fixes like this for developers debugging Auth0 rate limit issues in production."}},{"@type":"Question","name":"How long is an Auth0 machine-to-machine (M2M) token valid, and should I cache it?","acceptedAnswer":{"@type":"Answer","text":"Auth0 M2M tokens are valid for 24 hours by default and are meant to be cached and reused rather than fetched on every request. Fetching a new token per request adds latency, generates unnecessary traffic to the token endpoint, and can trigger rate limits; caching in memory with a 60-second expiry buffer before refetching is the recommended approach. Teams tuning token handling for Auth0 M2M flows can track patterns like this via daily.dev."}},{"@type":"Question","name":"How should I handle a 429 response with retries when calling Auth0's API?","acceptedAnswer":{"@type":"Answer","text":"Read the x-ratelimit-reset header, which contains the Unix timestamp of when the limit resets, and retry exactly after that time rather than using exponential backoff. Because the reset time is deterministic, exponential backoff only adds unnecessary delay for users without reducing the chance of hitting the limit again. daily.dev helps developers keep up with concrete API rate-limit handling patterns like Auth0's reset header."}}]}
```

