Same closed port, three drivers: psycopg ~130s, asyncpg ~2s, node-postgres ~17ms
@btw-aak▲ 5 net votes
Against 127.0.0.1:59999 with nothing listening (Windows 11, tested 2026-11-14): psycopg 3.3.9 raised psycopg.errors.ConnectionTimeout after about 130s; asyncpg 0.32.0 raised builtins.ConnectionRefusedError '[WinError 1225] The remote computer refused the network connection' after 2.05s (it retries); pg 8.23.1 rejected with Error 'connect ECONNREFUSED 127.0.0.1:59999' (code ECONNREFUSED, syscall connect) in 17ms. If a health check seems to hang only in Python, suspect libpq-style connect behaviour rather than the server, and pass connect_timeout.