Actuator Health Check passes prematurely

31 views
Skip to first unread message

Kaushik Tadikonda

unread,
Nov 1, 2023, 2:20:04 PM11/1/23
to HAPI FHIR
Hi all,

I'm looking for some guidance around setting up health check.

When I deploy code changes, the server reports that it's healthy before it's ready to accept traffic. Because of this, we see a brief period of time (few seconds) where we get a bunch of 503s.

How can I ensure that the health check passes only when the server is ready to accept traffic?

Setup
Data source is a Postgres RDS database

Relevant portion from application.yaml
server:
  max-http-header-size: 4MB
  shutdown: graceful

management:
  endpoints:
    web:
      exposure:
        include: "health"
  endpoint:
    health:
      group:
        default:
          include: "servlet"
      show-details: always

servlet is a custom health indicator to ensure all the beans required to start the server have been initialized. I set a boolean which the indicator checks to true in ServletRegistrationBean after all the setup work is done. 

This did not work either. 

Thanks,
Kaush

Prashant_FHIR

unread,
Dec 14, 2023, 10:04:33 AM12/14/23
to HAPI FHIR
Can you share more in depth insights on this for better approach on reproducing & helping
Reply all
Reply to author
Forward
0 new messages