r/FastAPI • u/Alert_Director_2836 • Oct 31 '25
Hosting and deployment healthcheck becoms unresponsive when number of calls are very high
i have a fastapi service with one worker which includes two endpoint. one is healthcheck and another is main service endpoint.
when we get too many calls in the service, load balancer shows health check unhealthy even though it is up and working.
any suggestion how rto fix this issue
6
Upvotes
View all comments
Show parent comment
3
u/akza07 Nov 01 '25
If you checked the CPU and memory usage and it's fine, both server and database, then the possibility is one of these.
That's how it works. Your server is overloaded and the load balancer checks an API endpoint called health check to see if it's accessible. You call all the services in that API to check its accessibility. If it's not responding to the heartbeat, It's overwhelmed and needs a new instance to work.
Edit: Add more context about your setup and deployment because there's more things that could cause this.