struct

DB::Pool::Options

Inherits Struct / Value / Object

Constructors

new(initial_pool_size : Int32 = 1, max_pool_size : Int32 = 0, max_idle_pool_size : Int32 = 1, checkout_timeout : Float64 = 5.0, retry_attempts : Int32 = 1, retry_delay : Float64 = 0.2)
Source

Class methods

from_http_params(params : HTTP::Params, default = Options.new)
Source

Instance methods

checkout_timeout

seconds to wait before timeout while doing a checkout

clone
Source
copy_with(initial_pool_size _initial_pool_size = @initial_pool_size, max_pool_size _max_pool_size = @max_pool_size, max_idle_pool_size _max_idle_pool_size = @max_idle_pool_size, checkout_timeout _checkout_timeout = @checkout_timeout, retry_attempts _retry_attempts = @retry_attempts, retry_delay _retry_delay = @retry_delay)
Source
initial_pool_size

initial number of connections in the pool

max_idle_pool_size

maximum amount of idle connections in the pool

max_pool_size

maximum amount of connections in the pool (Idle + InUse). 0 means no maximum.

retry_attempts

maximum amount of retry attempts to reconnect to the db. See Pool#retry

retry_delay

seconds to wait before a retry attempt