Handle connection timeouts with a slightly nicer error message.

This commit is contained in:
Michael Koziarski
2008-09-04 16:58:44 +02:00
parent 0d9e238cc9
commit ca5ffd10b9

View File

@@ -145,7 +145,7 @@ module ActiveRecord
if @queue.wait(@timeout)
checkout_existing_connection
else
raise ConnectionTimeoutError, "could not obtain a database connection in a timely fashion"
raise ConnectionTimeoutError, "could not obtain a database connection within #{@timeout} seconds. The pool size is currently #{@size}, perhaps you need to increase it?"
end
end
end