'How to make sure a (liveness) endpoint, served by spark-java (jetty) will always find a thread available in order to respond quickly enough?
I've got a scala application with a few endpoints served by spark-java (with jetty).
That application is running on a kubernetes pod, and one of the endpoints takes a lot of time to respond (around 5 minutes).
Because the pod is occupied with that endpoint, the liveness endpoint (a simple health-check always returning 204) of the app (interrogated by kubernetes) is sometimes not responding quickly enough, and because of that, kubernetes restarts the pod Container xxx failed liveness probe, will be restarted.
But it should not.
My assumption is that there is no thread available when kubernetes tries to reach the liveness endpoint, and that that request is enqueued for too long.
So:
- how to check the number of maximum threads set up for the app ? what is the default value of spark-java and jetty ?
- is it possible to reserve/guarantee a thread for a given endpoint ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
