Skip to content

Interface: PoolConfig

Defines the settings for the database connection pool, controlling how many connections can be opened, reused, and managed concurrently. This type is a subset of the Knex PoolConfig type, excluding keys that are not relevant for the SQL Adapter.

Properties

PropertyTypeDescription
acquireTimeoutMillis?numberThe maximum time in milliseconds to wait for a connection to be acquired from the pool before timing out.
createRetryIntervalMillis?numberThe time in milliseconds to wait before retrying to create a new connection when the pool is at maximum capacity.
createTimeoutMillis?numberThe maximum time in milliseconds to wait for a new connection to be created before timing out.
destroyTimeoutMillis?numberThe maximum time in milliseconds to wait for a connection to be destroyed before timing out.
idleTimeoutMillis?numberThe time in milliseconds after which idle connections are closed.
max?numberThe maximum number of connections to maintain in the pool.
min?numberThe minimum number of connections to maintain in the pool.
name?stringThe name of the pool, used for debugging purposes.
priorityRange?numberSets the number of priority levels available for connection requests; priorities range from 0 (highest) up to priorityRange - 1 (lowest).
reapIntervalMillis?numberThe time in milliseconds after which idle connections are reaped.
refreshIdle?booleanThe time in milliseconds after which idle connections are refreshed.
returnToHead?booleanWhether to return idle connections to the head of the pool.