Troubleshooting
Common issues and solutions.
Local Development
Daemon Won't Start
Symptom: postbase start fails or hangs
Solutions:
-
Check Docker is running:
docker info -
Check port availability:
lsof -i :9432 lsof -i :5432 -
Remove stale state:
rm -f ~/.postbase/state.json postbase start -
Check Docker logs:
docker logs postbase-postgres
Port Already in Use
Symptom: Error: Port 5432 already in use
Solutions:
-
Find and stop the process:
lsof -i :5432 kill <PID> -
Use a different port:
postbase start --pg-port 5433 -
Stop existing PostgreSQL:
# macOS with Homebrew brew services stop postgresql # Linux sudo systemctl stop postgresql
Cannot Connect to Database
Symptom: Connection refused or ECONNREFUSED
Solutions:
-
Check daemon is running:
postbase status -
Verify PostgreSQL container:
docker ps | grep postbase -
Test direct connection:
psql "postgresql://postgres:postgres@localhost:5432/postgres" -
Restart the daemon:
postbase stop postbase start
Migration Checksum Mismatch
Symptom: Checksum mismatch for migration X
Cause: Migration file was modified after being applied.
Solutions:
-
If intentional, reset the checksum:
UPDATE _postbase_migrations SET checksum = '<new_checksum>' WHERE name = 'migration_name'; -
If accidental, restore the original file from version control.
-
Create a new migration instead of modifying existing ones.
Cloud Platform
Authentication Failed
Symptom: 401 Unauthorized or Authentication required
Solutions:
-
Re-authenticate:
postbase cloud logout postbase cloud login -
Check credentials file:
cat ~/.postbase/cloud.json -
Verify token hasn't expired (tokens are long-lived but may be revoked).
Database Provisioning Stuck
Symptom: Database stuck in "provisioning" status
Solutions:
-
Check Railway status: https://status.railway.app
-
Wait a few minutes (provisioning can take 2-5 minutes)
-
Check detailed status:
postbase cloud databases list -p <project> --json -
Contact support if stuck for >10 minutes
Cannot Connect to Cloud Database
Symptom: Connection refused or SSL errors
Solutions:
-
Get correct connection string:
postbase cloud url <database> -p <project> -
Ensure SSL is disabled (Railway proxy doesn't require SSL):
postgresql://...?sslmode=disable -
Check network connectivity:
telnet <host> <port>
Backup Failed
Symptom: Backup shows "failed" status
Solutions:
-
Check backup service health:
curl https://postbase-backup-service.up.railway.app/health -
Check database size (large databases may timeout)
-
Retry the backup:
postbase cloud backups create -p <project> -d <database> -
Check backup service logs (contact support)
PITR Issues
WAL Receiver Not Running
Symptom: pitr status shows "WAL Receiver: NOT RUNNING"
Solutions:
-
Check receiver status:
postbase cloud pitr receiver -p <project> -d <database> -
Restart the receiver:
postbase cloud pitr restart-receiver -p <project> -d <database> -
Verify database supports replication:
- Must use
ghcr.io/zeroexcore/postbase:postgres-15-pitrimage
- Must use
-
Check backup service health:
postbase cloud pitr service-status -p <project> -d <database>
High WAL Lag
Symptom: WAL lag is >5 minutes
Causes:
- High write volume on database
- Network issues between Railway and backup service
- Backup service overloaded
Solutions:
-
Monitor lag:
postbase cloud pitr receiver -p <project> -d <database> -
Restart receiver:
postbase cloud pitr restart-receiver -p <project> -d <database> -
Contact support if lag persists
Cannot Restore to Target Time
Symptom: Target time outside recovery window
Solutions:
-
Check recovery window:
postbase cloud pitr status -p <project> -d <database> -
Choose a time within the window
-
The earliest time is the base backup time
-
The latest time is the most recent WAL segment
SDK Issues
Type Errors
Symptom: TypeScript errors when using SDK
Solutions:
-
Regenerate types:
postbase types generate --database myapp --all --output ./src/db/types.ts -
Ensure types match SDK version:
npm update @postbase/sdk -
Check import path:
import type { Database } from './db/types'
Connection Pool Exhausted
Symptom: Connection pool exhausted or slow queries
Solutions:
-
Close unused connections:
await db.close() -
Increase pool size:
const db = createClient({ connectionString: '...', pool: { max: 20 } }) -
Use connection pooling (e.g., PgBouncer) for high-traffic apps
Realtime Not Receiving Events
Symptom: Subscriptions don't receive updates
Solutions:
-
Verify triggers exist:
\d users -- Check triggers section -
Test NOTIFY manually:
NOTIFY users, '{"test": true}'; -
Check channel name matches table:
db.channel('users') // Must match NOTIFY channel -
Check for connection errors:
channel.on('error', console.error)
Getting Help
Debug Information
Collect this info when reporting issues:
# CLI version
postbase --version
# System info
uname -a
node --version
docker --version
# Daemon status
postbase status --json
# Docker containers
docker ps
# Recent logs
docker logs postbase-postgres --tail 50Support Channels
- GitHub Issues: https://github.com/zeroexcore/postbase/issues
- Discord: Coming soon
- Email: support@postbase.sh
Known Issues
Check the GitHub issues for known problems:
https://github.com/zeroexcore/postbase/issues?q=is%3Aopen+label%3Abug