Closed epugh closed 3 years ago
Hey man, I'll test what you did to see better how your scenario works.
Thanks! Here is my PR to Quepid that has this gem, which ironically is number 404 ;-) https://github.com/o19s/quepid/pull/404
Let me know if you need help reproducing it on the PR!
@linqueta I had a thought... Was it working the way I saw it because I was running Rails in DEV mode? If I ran it in PRODUCTION mode, would the healthcheck have returned the nicely formatted message instead?
Yep.. if you are running in PROD mode you get what you expected!
code | 503
-- | --
errors |
0 |
name | "migrations"
exception | "ActiveRecord::ConnectionNotEstablished"
message | "Unknown MySQL server host 'mysql' (-2)"
1 |
name | "database"
exception | "ActiveRecord::ConnectionNotEstablished"
message | "Unknown MySQL server host 'mysql' (-2)"
I think this is worth documenting!
You are right man, I tried what you said and it's truth. So, I'll add a tip in README to guide people about it. If you want/may build this pull request it'll be awesome!
I was testing hitting the
/healthcheck
point, and I decided to kill the database with aps kill -9
, and now the error raised is a "ActiveRecord::ConnectionNotEstablished ". I was expecting to instead hit the/healthcheck
and get back a 503 error!Likewise, when I had a pending migration, I got a message about it instead of the healthcheck point rendering: