Skip to content
Back to the playbook

Diagnosing node-postgres connection timeouts at startup

node-postgres (pg)revision 1

Diagnostic tree

  1. In progressPool.connect (or a query) timed outnode-postgres uses this same message and the same connectionTimeoutMillis both for establishing a brand-new physical connection and, in recent versions, for a caller waiting in the pool's internal queue for one to become available — so the message alone doesn't tell you which happened.
View the whole map (6 more steps)
  • Check whether the pool itself is the bottleneck
  • The pool is maxed out and callers are queued
  • The pool never got a connection at all
  • Raise max to match real peak concurrency, or serialise the startup burst
  • Re-check pool counters under the same load pattern
  • Resolved

What to test

Pool.connect (or a query) timed out

node-postgres uses this same message and the same connectionTimeoutMillis both for establishing a brand-new physical connection and, in recent versions, for a caller waiting in the pool's internal queue for one to become available — so the message alone doesn't tell you which happened.

What happened?