RATE002warningPro

in-memory-rate-limiter

In-memory rate limiter resets on deploy and doesn't share state across instances

Applies to: JavaScript, Python, TypeScript

Why this matters

In-memory rate limiters (Python dicts, JS Maps) lose all state when the process restarts and don't share state across multiple instances. This means rate limits reset on every deploy and each server instance has its own counter, making the limits ineffective. Use Redis or a similar external store.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, RATE002 includedstablestack explain RATE002

RATE002 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: RATE002