From b83c097a3c6b01870e58c4da01702c2e4996ca0e Mon Sep 17 00:00:00 2001 From: Dmytrii Nagirniak Date: Tue, 1 Dec 2015 08:02:17 +1100 Subject: Explain the connection pool error message better The previous message was misleading (especially for Ops guys) when diagnosing problems related to the database connection. The message was suggesting that the connection cannot be obtained which normally assumes the need to look at the database. But this isn't the case as the connection could not be retrieved from the application's internal connection pool. The new message should make it more explicit and remove the confusion. --- .../lib/active_record/connection_adapters/abstract/connection_pool.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 486b7b6d25..ccd2899489 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -197,7 +197,7 @@ module ActiveRecord elapsed = Time.now - t0 if elapsed >= timeout - msg = 'could not obtain a database connection within %0.3f seconds (waited %0.3f seconds)' % + msg = 'could not obtain a connection from the pool within %0.3f seconds (waited %0.3f seconds); all pooled connections were in use' % [timeout, elapsed] raise ConnectionTimeoutError, msg end -- cgit v1.2.3