Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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