chore(knex): adds comments around config choices. No code changes (#3696)

This commit is contained in:
Iain Sproat
2024-12-16 10:14:14 +00:00
committed by GitHub
parent 6d3ba0de22
commit 89caea32eb
@@ -141,8 +141,10 @@ export const createKnexConfig = ({
pool: {
min: 0,
max: maxConnections,
acquireTimeoutMillis: 16000, //allows for 3x creation attempts plus idle time between attempts
createTimeoutMillis: 5000
acquireTimeoutMillis: 16000, // If the maximum number of connections is reached, it wait for 16 seconds trying to acquire an existing connection before throwing a timeout error.
createTimeoutMillis: 5000 // If no existing connection is available and the maximum number of connections is not yet reached, the pool will try to create a new connection for 5 seconds before throwing a timeout error.
// createRetryIntervalMillis: 200, // Irrelevant & ignored because propogateCreateError is true.
// propagateCreateError: true // The propagateCreateError is set to true by default in Knex and throws a TimeoutError if the first create connection to the database fails. Knex recommends that this value is NOT set to false, despite what 'helpful' people on Stackoverflow tell you: https://github.com/knex/knex/issues/3455#issuecomment-535554401
}
}
}