Closed
Description
Hi,
Thanks for this library, it's great.
Currently if I call pg.connect
but my pool is full, node-postgres will block until a connection becomes available. Is there a way to set a timeout on a connection attempt? I would rather not block indefinitely if the pool is full.
Something like pg.connect({timeout: 500}, function(err) { console.log(err); }
I can wrap it in a setTimeout
, but do I need to do cleanup/is there a way to cancel a connection attempt?
Metadata
Metadata
Assignees
Labels
No labels