MiniProfiler / rack-mini-profiler

Profiler for your development and production Ruby rack apps.
MIT License
3.71k stars 404 forks source link

Gracefully fail when RedisStore breaks #541

Closed jclusso closed 1 year ago

jclusso commented 2 years ago

We recently had an issue with our Redis database. Since we have this enabled for admins, our admin users were having issues while the rest of our application continued to work. Is there a way to rack mini profiler gracefully disable itself or something if there is an issue connecting to the RedisStore?

gmcgibbon commented 1 year ago

Can you provide a stacktrace and explain what exactly isn't working? There is error handling when the storage mechanism fails:

https://github.com/MiniProfiler/rack-mini-profiler/blob/edbcad3197a1a9db9260b502296cc697f12f1520/lib/mini_profiler/profiler.rb#L461

so it would be nice to know what is happening, and what you're expecting to happen. Thanks!

jclusso commented 1 year ago

Unfortunatly it's been too long since it happened so I wouldn't have anything at this point. If something comes up in the future I'll reopen.

rbclark commented 4 months ago

I just ran into this same issue, when the profiler breaks the error is as follows:

Connection refused - connect(2) for 127.0.0.1:6379 (redis://localhost:6379/0) (Redis::CannotConnectError)