Runbook — Upstash Redis degraded
CMMD gracefully degrades to in-memory stores when Redis is unavailable. Customer impact is limited (rate limiting + session caching less efficient) but should be resolved within an hour.
| Field | Value |
|---|---|
| Severity | P1 |
| Owner | @aphaiboon |
| Alert source | Watchtower — cmmd_redis_connected == 0 for 5m |
| Estimated time | 5–15 min |
| Required access | Upstash dashboard, Railway |
Symptom
Section titled “Symptom”Watchtower → CMMD overall → request rate still flowing, but cmmd_redis_connected tile flips to 0. App functions but session validation + rate limiting are degraded.
Why this is P1 not P0
Section titled “Why this is P1 not P0”Per server/redis-client.ts + AGENTS.md, CMMD gracefully falls back to in-memory stores for sessions, rate limiting, and caching when Redis is unavailable. The app does not crash. But:
- Session state isn’t shared across Railway replicas → users may see inconsistent state under load
- Rate limiting is per-replica → an attacker could bypass it by hitting different replicas
- Sidekick session persistence may be impacted
Most likely causes
Section titled “Most likely causes”- Upstash quota exhausted — free tier 30MB limit. Check
cmmd_redis_memory_bytesif exposed. - Network blip between Railway and Upstash — usually self-heals in <60s.
- Upstash platform incident — check Upstash status (no public status page tile yet; check
status.upstash.commanually). - Stale
REDIS_URLenv var — recently rotated and Railway env wasn’t updated.
Diagnose
Section titled “Diagnose”-
Upstash dashboard → check database state, memory usage, recent ops.
-
Railway → CMMD service env → confirm
REDIS_URLis set + not expired. -
From Railway shell:
Terminal window redis-cli -u "$REDIS_URL" ping# Expect: PONG
Mitigate
Section titled “Mitigate”Memory quota
Section titled “Memory quota”- Upstash dashboard → flush or shrink the keyspace if low-value cache entries dominate.
- If quota exhausted often → upgrade Upstash tier or evict more aggressively in code.
Stale URL
Section titled “Stale URL”- Upstash → copy the current connection URL.
- Railway → CMMD service → env → update
REDIS_URL→ redeploy.
Upstash incident
Section titled “Upstash incident”- Wait for Upstash to restore.
- CMMD continues functioning (degraded) during the outage.
Verify resolved
Section titled “Verify resolved”cmmd_redis_connected == 1for 2 minutesredis-cli -u $REDIS_URL pingreturns PONG- No new error logs of pattern
[REDIS]in Railway
Escalate
Section titled “Escalate”- Sustained 30+ min outage with customer-visible impact → notify in
#alertsand consider customer comm - Upstash account-level issue → contact Upstash support
Related
Section titled “Related”- runbook-cmmd-app-down
- AGENTS.md “Redis optional” note (app gracefully falls back)