Purple-Devs / health_check

Simple health check of Rails app for use with uptime checking sites like newrelic and pingdom
MIT License
477 stars 127 forks source link

Redis health check keeps connections open #80

Closed DannyBen closed 3 years ago

DannyBen commented 6 years ago

I have seen my Redis connection count skyrocket due to the fact that the redis health check assigns a new Redis instance on each call:

https://github.com/ianheggie/health_check/blob/e72703c088e7d52d781b52ae01a75d68a5786feb/lib/health_check/redis_health_check.rb#L6-L10

Maybe it would make sense to allow us to set a HealthCheck.redis_client instead of HealthCheck.redis_url ? This way, I can do HealthCheck.redis_client = $redis, or whatever logic I have to maintain a single client or a pool of clients.

If not that, then maybe call res.disconnect! when done?

colin-byrne-1 commented 5 years ago

This gem looks great, and I really want to implement it at my company, but do changes only get merged once a year after new rails releases? Could you add another admin to the project?

shlima commented 4 years ago

@DannyBen @cobyrne09 you can check an alternative

ianheggie commented 3 years ago

@DannyBen @cobyrne09 - PR that fixes issue has been merged and after I have finished testing the PRs I have merged I will release shortly

DannyBen commented 3 years ago

Thanks - but I moved on to my own custom solution long ago. Feel free to close this issue.

ianheggie commented 3 years ago

Done, (And Fix is in version 3.1.0 released just now for anyone else that is curious)