Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

2.11.0 - Enable use of idle connection pruning

Latest
Compare
Choose a tag to compare
Loading
@penny-for-vapor penny-for-vapor released this 26 Aug 15:02
cd47a70
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

What's Changed

Enable use of idle connection pruning by @gwynne in #225

AsyncKit 1.21.0 added support for automatic pruning of idle database connections in the connection pool. This PR adds the necessary configuration parameters to the Postgres driver, enabling Fluent users to take advantage of this new functionality:

app.databases.use(.postgres(
 url: "postgres://user@pass:host/db",
 pruningInterval: .minutes(1),
 maxIdleTimeBeforePruning: .minutes(10)
), as: .psql)

The pruningInterval controls how often the pool will check for idle connections; specifying nil disables idle pruning entirely. The maxIdleTimeBeforePruning controls how long a connection must go unused before being pruned.

Reviewers

Thanks to the reviewers for their help:

This patch was released by @gwynne

Full Changelog: 2.10.1...2.11.0

Contributors

gwynne and MahdiBM
Assets 2
Loading

AltStyle によって変換されたページ (->オリジナル) /