No commit activity in last 3 years
No release in over 3 years
A Sequel extension to remove stale, potentially timed out, connections from the connection pool.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 3.41.0
 Project Readme

Deprecated¶ ↑

As of Sequel 4.36.0 a connection_expiration extension has been added which replaces this gem.

github.com/jeremyevans/sequel/blob/master/lib/sequel/extensions/connection_expiration.rb


Fresh Connections¶ ↑

The fresh_connections extension removes stale connections from the connection pool, ensuring any connections that have timed out won’t be used.

Enable the extension with:

Sequel.extension :fresh_connections

A :max_connection_age option will then be available with Sequel::connect, this allows setting the maximum age a connection is allowed to reach before being removed from the pool.

Sequel.connect(..., :max_connection_age => 600)

Each time a connection is used its age is reset, so as long as connections are in constant use they will not be removed from the pool.

Sequel version compatibility¶ ↑

  sequel  | sequel_fresh_connections
----------+-------------------------
<= 3.40.0 |          0.1.0
>= 3.41.0 |          0.2.0