Skip to content

Support connection pool timeout configuration

Compare
Choose a tag to compare
@tanner0101 tanner0101 released this 15 Jul 18:52
f310f88
This patch was authored by @mattpolzin and released by @tanner0101.

Allows for configuration of connection pool timeouts (#161).

The connection pool timeout defines the maximum amount of time allowed for requesting a connection from the pool. This helps to prevent deadlock.

try app.databases.use(.postgres(
    configuration: ...,
    connectionPoolTimeout: .minutes(1)
), as: .psql)

The default timeout is 10 seconds.