Purple-Devs / health_check

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

404 in production mode #116

Open alain-andre opened 3 years ago

alain-andre commented 3 years ago

Hi, we are trying to implement your gem in our stack, everything is working fine in development and testing, but in production mode we cannot ping the health checks.

In fact, we have detected that config.eager_load at true causes the route to have no health_check and so we get a 404 on the checks.

Has anyone encountered this problem before?

jmarchello commented 1 year ago

Hello @alain-andre. Could you tell me what version of Rails and Ruby you are using when encountering this issue?

dfuentes77 commented 1 year ago

For future historians, I added a catchall route at end of routes.rb, which 404'd unknown requests. That was why I was getting 404s here. Adding the documented health_check_routes before the catchall route, fixed it for me.