HollaHoop

Verify and tune Postgres connection pooling for traffic spikes

FeatureShipped· by Elsama· 2 months ago

Context: Each Next.js instance opens DB connections via Supabase. Under a spike, unpooled connections can exhaust Postgres.

Scope:

  • Confirm whether Supavisor or PgBouncer fronts Postgres on the Supabase host.
  • Point the app at the pooled endpoint (transaction mode) where appropriate.
  • Set sane pool sizes versus Postgres max_connections, accounting for 2 pm2 instances.
  • Load test to validate headroom.

Done when: connection counts stay bounded under load and the app uses the pooler.

Comments (1)

  • Elsama· 2 months ago

    PR ready for review: https://github.com/El-SaMa/hollahoop/pull/45

    Readiness probes at /api/ready and /api/v1/ready, pooling helpers/tests, CLI check script, runbook docs/POSTGRES_POOLING.md, and HTTP service-role guards. No migration needed.

    Verified: 522 vitest passed, build, tsc, eslint.

Join the discussion

Sign in to leave a comment on this thread.

HollahoopGet yours