From ca5ffd10b9749ef0d55d7b5b08e2e7820fc2f8a5 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Thu, 4 Sep 2008 16:58:44 +0200 Subject: Handle connection timeouts with a slightly nicer error message. --- .../lib/active_record/connection_adapters/abstract/connection_pool.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') 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 -- cgit v1.2.3