Verify_active_connections! deprecated in rails 4, what should we do to deal with this functionality?

I am following this post to configure puma with a wizard:

https://www.digitalocean.com/community/articles/how-to-set-up-zero-downtime-rails-deploys-using-puma-and-foreman

puma script reports verify_active_connections! after connecting, but not available on rails 4. Commenting on the method call, the script is executed, but I'm not sure if this will lead to a resource leak or not.

The only documentation that I see on this issue is:

https://github.com/socialcast/resque-ensure-connected/issues/3

But there is no final answer on what to do. I think that the options should either omit this, and the rails will process it now under the hood, or each checked every block. Does anyone have a real answer on what to do? Thanks.

+7
ruby database ruby-on-rails activerecord puma
source share
1 answer

It looks like in Rails 4 it was removed in this commit:

https://github.com/rails/rails/commit/9d1f1b1

It seems you should now look at:

 ActiveRecord::Base.clear_active_connections! 

Here are some github threads that discuss it:

+1
source share

All Articles