aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2013-01-24 22:50:51 +0900
committerAkira Matsuda <ronnie@dio.jp>2013-01-24 22:53:40 +0900
commita8eb13a87faa2fe2dcf31826ee1c5cce0b3d4d47 (patch)
tree4f3642e2bf3735ea3bdadbbad58dd5d6a72c636e
parent8dc7ef972835fc8fa3ff9a740c0317cffd57eaee (diff)
downloadrails-a8eb13a87faa2fe2dcf31826ee1c5cce0b3d4d47.tar.gz
rails-a8eb13a87faa2fe2dcf31826ee1c5cce0b3d4d47.tar.bz2
rails-a8eb13a87faa2fe2dcf31826ee1c5cce0b3d4d47.zip
Default dead_connection_timeout to 5
or the ConnectionPool silently fails to close connections inside the Thread
-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 3675184193..847d9da6e6 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -237,7 +237,7 @@ module ActiveRecord
@spec = spec
@checkout_timeout = spec.config[:checkout_timeout] || 5
- @dead_connection_timeout = spec.config[:dead_connection_timeout]
+ @dead_connection_timeout = spec.config[:dead_connection_timeout] || 5
@reaper = Reaper.new self, spec.config[:reaping_frequency]
@reaper.run