-
- Downloads
Simplify /-/liveness check to avoid connecting to the database
The previous implementation would hit the database each time and provide a dummy response. If the database goes down, this means all application workers would be taken out of service. Simplify this check by using a Rails middleware that intercepts this endpoint and returns a 200 response.
parent
87f03f01
No related branches found
No related tags found
Showing
- app/controllers/health_controller.rb 2 additions, 3 deletionsapp/controllers/health_controller.rb
- changelogs/unreleased/sh-simplify-liveness-check.yml 5 additions, 0 deletionschangelogs/unreleased/sh-simplify-liveness-check.yml
- config/application.rb 4 additions, 0 deletionsconfig/application.rb
- config/routes.rb 1 addition, 1 deletionconfig/routes.rb
- doc/user/admin_area/monitoring/health_check.md 5 additions, 22 deletionsdoc/user/admin_area/monitoring/health_check.md
- lib/gitlab/middleware/liveness_health_check.rb 43 additions, 0 deletionslib/gitlab/middleware/liveness_health_check.rb
- spec/controllers/health_controller_spec.rb 0 additions, 51 deletionsspec/controllers/health_controller_spec.rb
- spec/lib/gitlab/middleware/liveness_health_check_spec.rb 57 additions, 0 deletionsspec/lib/gitlab/middleware/liveness_health_check_spec.rb
Please register or sign in to comment