Symptoms
- Sentry: spike
LiveblocksErrorORWebSocket connection failedfrom frontend - Multi-user workflow co-edit not working (cursors not syncing, broadcasts dropped)
POST /api/v1/liveblocks/authreturns 500 OR 502- Liveblocks dashboard (https://liveblocks.io (opens in a new tab)) shows status issue OR fail rate
Severity & escalation
- PAGE 24/7 — real-time collab disabled. However, degraded mode is possible: REST + versions work (Phase 12 MD edit), just without presence/cursors
- Ack window: 15 min
- Escalate after 30 min → engineering lead
- Long outage (>2h): communicate degraded mode to users via UI banner
Immediate actions (< 5 min)
- Check Liveblocks status: https://status.liveblocks.io/ (opens in a new tab) (or dashboard top bar)
- Check our auth endpoint:
curl -X POST arno-api.vadimpianof.workers.dev/api/v1/liveblocks/auth ...with valid JWT — error? - Check Liveblocks dashboard:
- https://liveblocks.io (opens in a new tab) → project
arno - Connection status / error rate / rate limit usage
- https://liveblocks.io (opens in a new tab) → project
- Verify secret:
wrangler secret list --config wrangler.toml | grep LIVEBLOCKS—LIVEBLOCKS_SECRET_KEYpresent
Diagnosis (5-20 min)
Branch A: Liveblocks-side outage
- Status page shows incident → wait
- Switch frontend to degraded mode banner:
- "Real-time collab is temporarily unavailable. Changes are saved and visible after reload."
- MD editor (Phase 12) continues to work via REST
- Workflow canvas: read-only mode (user cannot edit nodes/edges while Liveblocks is down — workflow primary storage lives there)
Branch B: Our auth endpoint broken
- Tail wrangler — find exception in
liveblocks.ts::POST /api/v1/liveblocks/auth - Common causes:
LIVEBLOCKS_SECRET_KEYenv var missing or rotated incorrectly- Project ID hardcoded mismatch (see master spec §I.2.2 —
project:${id}room naming) - User ownership check failed silently
Branch C: Rate limit hit
- Liveblocks Free: 100 connections/mo concurrent. If we crossed → 429 on auth
- Check dashboard → Usage
- Mitigation: upgrade to Liveblocks Pro $99/mo per cost ladder; OR apply startup credits (parking master spec §III.6)
Recovery
| Issue | Action |
|---|---|
| Liveblocks-side outage | Banner degraded mode; wait. MD editor still works. |
| Secret missing/wrong | echo -n "sk_dev_..." | wrangler secret put LIVEBLOCKS_SECRET_KEY --config wrangler.toml |
| Rate limit | Apply Liveblocks Startup program / upgrade Pro |
| Auth endpoint code bug | Rollback last deploy → fix → redeploy |
Verification
POST /api/v1/liveblocks/authwith valid JWT returns 200 with session token- Browser test: open project → cursor from 2nd window visible
- Sentry
LiveblocksErrorrate < 0.1% - Liveblocks dashboard "Healthy" status
Aftermath
- Post-mortem trigger: downtime > 30 min (collab harder to recover from than DB read-only)
- Document: degraded mode duration, which users were impacted
- If rate limit hit — review usage trends, plan upgrade
Known false positives
- Liveblocks Yjs Storage REST API throttling on bulk fetch — periodic 429 for individual room queries, not an actual outage. Do not PAGE. Add backoff in our code.
- WebSocket reconnect storms on a client-side network blip — appears as many errors but self-heals