// troubleshooting guide · upstash
Upstash Ratelimit Not Working
- Status
- Workaround available
- platforms:
- @upstash/ratelimit (Next.js middleware, Vercel Edge, Cloudflare Workers, Lambda)
- updated:
- November 15, 2026
- reports:
- 3
- Method
- how we research
RUNBOOK · upstash/ratelimit-not-working4 FIXES
// quick answer
@upstash/ratelimit lets requests through when Redis is slow (default 5s timeout returns success) and loses analytics/sync writes on edge runtimes if you don't pass the 'pending' promise to waitUntil. Check result.reason and wire up waitUntil.
Most likely fix: Check why a request was allowed
How to fix it
// try these in order, the most common fix is first
FIX 1Check why a request was allowed
- 01Log result.success, result.remaining and result.reason
- 02If reason is 'timeout', fix latency (same-region database) or raise the timeout option
Did this fix it?FIX 2Pass pending to waitUntil
- 01const { success, pending } = await ratelimit.limit(id)
- 02In Next.js middleware: event.waitUntil(pending)
- 03In Cloudflare Workers: ctx.waitUntil(pending)
Did this fix it?FIX 3Use a stable identifier
- 01Use the user ID or the real client IP (x-forwarded-for / request.ip on Vercel)
- 02Don't fall back to a constant or random value
Did this fix it?FIX 4Fix analytics timeouts
- 01Analytics is off by default; leave it off on Lambda unless you await pending
- 02If enabled, await pending before the function returns
Did this fix it?
Symptoms
Rate limiting doesn't block anyone, limits reset unexpectedly, analytics dashboard stays empty, or Lambda tasks time out after adding analytics.
Why it happens
- C-01Redis call exceeds the timeout, so limit() returns success with reason 'timeout'
- C-02'pending' promise not passed to waitUntil in Vercel middleware / Cloudflare Workers
- C-03Using an identifier that changes per request (e.g. missing IP behind a proxy)
- C-04Free plan command quota exhausted
// this guide also covers
- upstash ratelimit not working
- upstash ratelimit timeout
- @upstash/ratelimit pending waituntil
- upstash ratelimit analytics not showing
Still not working?
If Upstash keeps failing, you're not alone. See every Upstash problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
Other Upstash errors
- Upstash ERR Max Requests Limit Exceeded
- Upstash ERR Max Request Size Exceeded
- Upstash Redis ECONNRESET Error
- Upstash WRONGPASS Invalid or Missing Auth Token
- Upstash ERR Max Concurrent Connections Exceeded
- Upstash Free Database Archived or Deleted
- Upstash Redis Slow or Timing Out
- QStash Signature Verification Failed (Invalid Signature)