vapor / fluent-postgres-driver

🐘 PostgreSQL driver for Fluent.
MIT License
149 stars 53 forks source link

Support connection pool timeout configuration #161

Closed mattpolzin closed 4 years ago

mattpolzin commented 4 years ago

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.

tanner0101 commented 4 years ago

These changes are now available in 2.1.0