Payara server service often stops unexpectedly


We have a few payara servers deployed in production in our network. Sometimes the payara service stops unexpectedly and we can no longer access our various deployed applications. The payara logs don’t give us any relevant information. Can you help us to implement an email notification when the payara service stops or give us some guidance to solve the problem definitively ?


I’d start with taking thread dumps (maybe also heap dumps, or at least class histograms) throughout the day AND then when the server stops responding.
Either you have a resource leak of some sort and/or you have configured too little resources, e.g. http threads.
The thread dumps should hopefully give an indication.

in order to check for liveness periodically, I would recommend using the Health-API from the Microprofile and use some monitoring-tool to check the /live endpoint.
In managed runtime environments like AWS, it can be conifigured in the Load-Balancer, that it would start a new instance as soon as the /live and /ready endpoints do not respond.

So as long as you do the investigation for the root cause, your application is still available for customers.

Hello, Thanks for your reply. How to solve the resource leakage problem, and which resources need to be configured in addition to http threads. How can I view thread dumps?

You would use a tool like jstack or jmap for this. These are bundled with the JDK.