-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
Description
In at least two cases, pg-pool creates a referenced timeout:
node-postgres/packages/pg-pool/index.js
Lines 292 to 295 in 3f6760c
tid = setTimeout(() => { this.log('remove idle client') this._remove(client) }, this.options.idleTimeoutMillis) node-postgres/packages/pg-pool/index.js
Lines 171 to 177 in 3f6760c
const tid = setTimeout(() => { // remove the callback from pending waiters because // we're going to call it with a timeout error removeWhere(this._pendingQueue, (i) => i.callback === queueCallback) pendingItem.timedOut = true response.callback(new Error('timeout exceeded when trying to connect')) }, this.options.connectionTimeoutMillis)
These timeouts are currently keeping the process from dying naturally.
Use setTimeout().unref() to prevent this.
Unless I am overlooking a need to keep the pool awake?