I have a microservice run with gunicorn:
command: ["gunicorn", "--bind", "0.0.0.0:8000", "a.b:API", "--access-logfile=-","--error-logfile=-"]
I configured a readiness and liveness probe:
readinessProbe:
httpGet:
path: /health-check
port: 8000
livenessProbe:
httpGet:
path: /health-check
port: 8000
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 2
The microservice has a very low load (about 5 requests per minute) and there are 3 copies of this microservice. Despite this fact every 2 hours the health check is failing because of timeout getting the headers.
I found an issue connected: https://github.com/benoitc/gunicorn/issues/1194 but what puzzles me is that the health check is not using the load balancer.
Could it be that the glbc load balancer is somehow catching the connections and not letting them release?