diff options
author | Vipul A M <vipulnsward@gmail.com> | 2013-07-22 01:41:41 +0530 |
---|---|---|
committer | Vipul A M <vipulnsward@gmail.com> | 2013-07-22 14:44:33 +0530 |
commit | 0b6c1f082f2112649611c993d39d4471ee1bb530 (patch) | |
tree | 78db8b031431a471f82c272da06c4877c7ba4061 /activerecord/lib | |
parent | e5275f9b5924f36f2bdd4dd9ac0a4f420384748f (diff) | |
download | rails-0b6c1f082f2112649611c993d39d4471ee1bb530.tar.gz rails-0b6c1f082f2112649611c993d39d4471ee1bb530.tar.bz2 rails-0b6c1f082f2112649611c993d39d4471ee1bb530.zip |
rescue from all exceptions in `ConnectionManagement#call`
Fixes #11497
As `ActiveRecord::ConnectionAdapters::ConnectionManagement` middleware does not rescue from Exception (but only from StandardError),
the Connection Pool quickly runs out of connections when multiple erroneous Requests come in right after each other.
Recueing from all exceptions and not just StandardError, fixes this behaviour.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 2 |
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 811749c7fd..cfdcae7f63 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -624,7 +624,7 @@ module ActiveRecord end response - rescue + rescue Exception ActiveRecord::Base.clear_active_connections! unless testing raise end |