Neon · Method
pool.connect
Use Neon's pooled endpoint and keep each container's local pool small. Create the pool globally so warm serverless invocations can reuse it without causing connection exhaustion.
Last updated
Syntax
const pool = new Pool({ connectionString, max: 1|2, idleTimeoutMillis: 5000 });
const client = await pool.connect();
client.release();In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
@neondatabase/serverless@vercel/functionsPgBouncerdefault_pool_sizemax_connectionsquery_wait_timeoutHTTPWebSocket