---
title: "Discussion on \"Why AI Apps Crash Under Real Traffic (And How to Fix It in 2 Lines)\" | Hashnode"
description: "Discussion on \"Why AI Apps Crash Under Real Traffic (And How to Fix It in 2 Lines)\". Rate limits, provider outages, stalled streams, and runaway retry storms silently break AI apps. Here is why standard retry loops fail on LLMs—and a zero-dependency fix for Node.js, TypeScript, and Edge runtimes."
url: "https://hashnode.com/posts/fix-ai-429-rate-limits-retry-storms/6b01d6fcd40733774b294069"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why AI Apps Crash Under Real Traffic (And How to Fix It in 2 Lines)](https://rohandev.hashnode.dev/fix-ai-429-rate-limits-retry-storms?utm_source=hashnode&utm_medium=feed)

Rate limits, provider outages, stalled streams, and runaway retry storms silently break AI apps. Here is why standard retry loops fail on LLMs—and a zero-dependency fix for Node.js, TypeScript, and Edge runtimes.

1d ago · 8 min read · rohandev.hashnode.dev  
Read the article

-   [#ai](https://hashnode.com/tag/ai)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#llm](https://hashnode.com/tag/llm)
-   [#openai](https://hashnode.com/tag/openai)

## Written by

[Rohan Wandre](https://hashnode.com/@rohan9024)

@rohan9024 · Germany

  
[View profile](https://hashnode.com/@rohan9024)

AI/ML Engineer

## Responses 3

Markdown supported · ⌘↵ to post

[BotSailor](https://hashnode.com/@botsailor)

[13h ago](https://hashnode.com/posts/fix-ai-429-rate-limits-retry-storms/6b01d6fcd40733774b294069/comment/6b02d0617f7d49e05eda0dad)

Really insightful breakdown, Rohan! I especially liked how you explained the hidden retry storms and why simply adding more retries can actually make things worse. The point about handling rate limits differently from billing errors is particularly useful. RetryKit looks like a practical solution for developers building AI applications at scale. Thanks for sharing!

[Ahmet Özel](https://hashnode.com/@ahmetozel)

[15h ago](https://hashnode.com/posts/fix-ai-429-rate-limits-retry-storms/6b01d6fcd40733774b294069/comment/6b02b8ffc8790508fabb42f3)

Wrapping an SDK that already has maxRetries set to 2 inside another retry loop is one of the easiest ways to accidentally DDoS your own rate-limit bucket during a traffic spike. Explicitly setting SDK retries to zero when an outer reliability layer owns backoff prevents that 3x4 multiplication immediately.

Distinguishing transient rate-limit 429s from hard insufficient\_quota 429s is equally important. Sleeping with exponential backoff on an exhausted billing key only stalls user requests for fifteen seconds when the right action is quarantining the key and failing over right away.

[Rohan Wandre](https://hashnode.com/@rohan9024)

[11h ago](https://hashnode.com/posts/fix-ai-429-rate-limits-retry-storms/6b01d6fcd40733774b294069/comment/6b02b8ffc8790508fabb42f3#reply-6b02f034a8147faa3aaf06c0)

Exactly but turning off SDK retry behavior merely takes care of retry amplification. There’s still the issue of ensuring reliable AI in production, which needs safe stream recovery, rate-limiting behavior for each service provider, concurrency aware retry budgets, and atomic tool call compaction
