aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-09-04 16:58:44 +0200
committerMichael Koziarski <michael@koziarski.com>2008-09-04 17:02:04 +0200
commitca5ffd10b9749ef0d55d7b5b08e2e7820fc2f8a5 (patch)
treec97b7f5f6f0784accd4489447c60819f30e1b90b
parent0d9e238cc938c96708d36bbd2cd4736e9ec93a1e (diff)
downloadrails-ca5ffd10b9749ef0d55d7b5b08e2e7820fc2f8a5.tar.gz
rails-ca5ffd10b9749ef0d55d7b5b08e2e7820fc2f8a5.tar.bz2
rails-ca5ffd10b9749ef0d55d7b5b08e2e7820fc2f8a5.zip
Handle connection timeouts with a slightly nicer error message.
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
index 5806dea061..54a39db1eb 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -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