Skip to main content

PostgreSQL

Troubleshooting the PostgreSQL database.

Symptoms

  • Connection refused or timeout
  • Applications report DB errors
  • High latency or locks

Checks

# Logs
ssh ravenhelm@100.115.101.81 "docker logs postgres --tail 200"

# Readiness
ssh ravenhelm@100.115.101.81 "docker exec postgres pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"

# Open a psql shell
ssh ravenhelm@100.115.101.81 "docker exec -it postgres psql -U ${POSTGRES_USER} -d ${POSTGRES_DB}"

Common Fixes

  • Ensure disk has free space.
  • Restart database container if a migration stalled.
  • Verify credentials in ~/ravenhelm/secrets/.env.