Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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


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.