This project is archived and is in readonly mode.
Active Record connection pool Rails 3.0.6
-
chaitanyav
There was a issue filed before #5736 connections not released in rails 3, I think the issue is still not resolved,
Loading development environment (Rails 3.0.6) >> Thread.list => [#<Thread:0x00000000551e28 run>] >> 5.times do ?> Thread.new do ?> ActiveRecord::Base.connection_pool.checkout >> end.join >> end => 5 >> Thread.list => [#<Thread:0x00000000551e28 run>] >> ActiveRecord::Base.connection_pool.checkout ActiveRecord::ConnectionTimeoutError: could not obtain a database connection within 5 seconds. The max pool size is currently 5; consider increasing it.I also manually tried
>> ActiveRecord::Base.connection_pool.clear_stale_cached_connections! => [] >> ActiveRecord::Base.connection_pool.checkout ActiveRecord::ConnectionTimeoutError: could not obtain a database connection within 5 seconds. The max pool size is currently 5; consider increasing it.Thank you
Chaitanya