Database connections will not be closed automatically, please close your
database connection at the end of the thread by calling `close` on your
connection. For example: ActiveRecord::Base.connection.close
eowarn
checkinconn
@reserved_connections.delete(key)
end
end
deprecate:clear_stale_cached_connections!
# 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.
...
...
@@ -214,12 +201,9 @@ def checkout
returnconn
end
@queue.wait(@timeout)
if(active_connections.size<@connections.size)
next
else
clear_stale_cached_connections!
if@size==active_connections.size
raiseConnectionTimeoutError,"could not obtain a database connection#{" within #{@timeout} seconds"if@timeout}. The max pool size is currently #{@size}; consider increasing it."