checkout()
Instance Public methods
Check-out a database connection from the pool, indicating that you want to
use it. You should call checkin when you no longer
need this.
This is done by either returning and leasing existing connection, or by
creating a new connection and leasing it.
If all connections are leased and the pool is at capacity (meaning the
number of currently leased connections is greater than or equal to the size
limit set), an ActiveRecord::ConnectionTimeoutError
e