Permalink
Browse files

Handle connection timeouts with a slightly nicer error message.

  • Loading branch information...
1 parent 0d9e238 commit ca5ffd10b9749ef0d55d7b5b08e2e7820fc2f8a5 @NZKoz NZKoz committed Sep 4, 2008
@@ -145,7 +145,7 @@ def checkout
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

0 comments on commit ca5ffd1

Please sign in to comment.