aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmytrii Nagirniak <dmytrii.nagirniak@rea-group.com>2015-12-01 08:02:17 +1100
committerDmytrii Nagirniak <dmytrii.nagirniak@rea-group.com>2015-12-01 08:06:54 +1100
commitb83c097a3c6b01870e58c4da01702c2e4996ca0e (patch)
tree8c8e8f24aef86c338f23b5f681b5f2d0160a0b69
parent3f16a098452ee5d447142bd9a6f6045cb1fc83b4 (diff)
downloadrails-b83c097a3c6b01870e58c4da01702c2e4996ca0e.tar.gz
rails-b83c097a3c6b01870e58c4da01702c2e4996ca0e.tar.bz2
rails-b83c097a3c6b01870e58c4da01702c2e4996ca0e.zip
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.
-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 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