Verify and troubleshoot
Deployment checks first, then fixes for what usually breaks.
Deployment checks
Migrations applied.
db:migrate ran clean against the Neon database from packages/db.
HTTP service answers.
Its public /health URL returns a response, and the scenes API works behind
authentication.
WebSocket service upgrades.
A room page connects, presence appears, and commits reconcile across two tabs.
Flush worker running.
Room edits become durable scene revisions in Postgres — not just Redis state.
Web app wired.
The deployed editor points at the deployed API and WebSocket URLs, and sign-in plus invites work end to end.
Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| First request slow | Cold start — the service was spun down and takes about a minute to wake. Narrow it with a keep-alive window. |
| WebSocket won't connect | Wrong port (WS_PORT, not PORT), wss:// vs ws:// mismatch, or origin not allowed — check WEB_ORIGIN and WS_ALLOWED_ORIGINS. |
| CORS or cookie errors | WEB_ORIGIN does not match the deployed web URL, or BETTER_AUTH_URL points at the wrong origin. |
| Changes not persisting | The flush worker is not running — room state is sitting in Redis only. |
NEXT_PUBLIC_* change not applied | Those values bake in at build time — redeploy the web app. |
Last verified: 2026-10-11.
Provider docs
What it owns
- The end-to-end deployment checklist
- Fixes for the five most common failures
Talks to
Sources: apps/http-server/src/app.ts, apps/ws-server/src/server.ts, apps/flush-worker/src/index.ts, apps/web/src/lib/sync/roomSync.ts (documented at commit b0026d9)