Failure runbooks
Runbooks turn outages into a sequence of known actions. Adapt these to your monitoring and deployment tooling before launch.
PostgreSQL unavailable#
Impact: authentication, relational state, message storage in the default backend, and most writes are unavailable.
- Stop repeated destructive restart loops.
- Check PostgreSQL process/container health and disk space.
- Check connection count, locks, WAL/disk pressure, and recent config changes.
- Confirm Plainwire is using the expected host, database, TLS mode, and credentials.
- Restore database service before trying application-level repairs.
- If corruption or data loss is suspected, preserve the failed volume and follow the restore runbook.
- After recovery, verify login, server membership, message send/read, uploads, and migrations.
Do not promote Redis or Scylla into a replacement relational database during an incident.
Redis unavailable#
Impact: distributed realtime acceleration degrades. Plainwire is designed to fall back to local behavior for supported Redis paths.
- Confirm the Plainwire application remains healthy.
- Check Redis network reachability and authentication.
- Check memory pressure, maxmemory behavior, and restart history.
- Restore Redis.
- Watch for reconnect success and presence/cache repopulation.
Redis is disposable in the Plainwire design. Do not restore stale cache data merely because a backup exists.
Scylla unavailable while backend is postgres#
Impact: usually none to primary message reads/writes. Migration/verification work may fail or queue.
- Leave
PLAINWIRE_MESSAGE_BACKEND=postgres. - Repair Scylla separately.
- Check outbox/reconciliation state before resuming migration.
Scylla unavailable while backend is dual#
PostgreSQL remains read authority. Preserve the PostgreSQL outbox and do not skip reconciliation to make dashboards green.
- Repair Scylla.
- Inspect migration status.
- Flush/reconcile the outbox.
- Run parity/verification again before moving forward.
Scylla unavailable while backend is scylla#
If the outage is not immediately recoverable and PostgreSQL is still a valid recovery mirror, switch back deliberately:
PLAINWIRE_MESSAGE_BACKEND=postgres
Redeploy, validate message history, then investigate Scylla offline. The exact rollback decision depends on how long Scylla has been authoritative and whether PostgreSQL has remained synchronized.
Disk nearly full#
- Identify which filesystem is full.
- Stop uncontrolled growth before deleting data.
- Check uploads, PostgreSQL, logs, container layers, and Scylla separately.
- Never delete PostgreSQL or Scylla database files by hand.
- Expand storage or use database-supported retention/cleanup mechanisms.
- Confirm free space and database health before restarting everything.
TURN failure#
Impact: users on restrictive NAT/firewall networks may fail to establish or maintain calls while users with direct peer connectivity still work.
- Check TURN credentials can be issued.
- Test relay-only ICE from two unrelated networks.
- Check listener ports and relay UDP range.
- Check certificate expiry for
turns:. - Check provider quota/billing or coturn host bandwidth.
- Restore normal
PLAINWIRE_ICE_TRANSPORT_POLICY=allafter diagnostics.
Reverse proxy or TLS failure#
- Check certificate status and DNS.
- Validate proxy configuration before reload.
- Confirm backend health directly from the proxy host.
- Confirm WebSocket upgrade behavior.
- Check upload-body limits separately from ordinary requests.
Suspected credential leak#
- Determine which secret was exposed.
- Revoke/rotate it at the source.
- Update Plainwire configuration through the normal secret path.
- Restart only the components that need the new credential.
- Search logs and audit trails for suspicious use.
- Rotate related secrets when trust boundaries overlap.
- Document the incident and prevent recurrence.