How can I monitor health of Jetty instance and automatically restart instance, if it runs out of memory?

link|improve this question

54% accept rate
feedback

1 Answer

I would look at something like Monit to watch the process and set a memory threshold for restarting the process.

Using Monit, you can have a statement like:

check process jetty
    with pidfile "/var/run/blah...
    start program = "/path/to/start_script"
    stop program = "/path/to/stop_script"
    if mem usage > 95% for 11 cycles then restart
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.