AppEngine Flex custom liveness_check path not reaching app endpoint

194 Views Asked by At

I've configured a custom liveness_check in my app.yaml. I've confirmed that the endpoint exists, and when I call it directly I receive a 200 response. However, when GoogleHC calls it it receives a 500 response and fails. My best guess is that the health check is not routing into the application itself. Is this supposed to work?

An image of my logs showing my successful call to /liveness_check followed by the unsuccessful call by GoogleHC: enter image description here

And here is the relevant part of my app.yaml:

liveness_check:
  path: "/liveness_check"
  check_interval_sec: 30
  timeout_sec: 4
  failure_threshold: 4
  success_threshold: 2
  initial_delay_sec: 300

I've checked that GoogleHC IP address is not blocked by appengine firewall.

This looks like a related question: AppEngine Flex custom readiness & liveness endpoints not firing

1

There are 1 best solutions below

4
Sandeep Vokkareni On

I noticed that the Liveness checks timeout is set to 4 seconds in the app.yaml file. Please take note of this as liveness probes typically take longer than the default timeout of 4 seconds. Also, the warning messages you are receiving provide you the opportunity to alert that an instance is unhealthy within the designated timeout period.

Please be aware that the App Engine regularly sends health check queries to make sure that an instance is operational and that it is fully deployed and prepared to respond to incoming requests. For more details, please see the Documentation.

As a result, I kindly ask that you try raising the initial-delay-sec parameter values in liveness checks.