How can I monitor health of Jetty instance and automatically restart instance, if it runs out of memory?
Asked
Active
Viewed 1,484 times
1 Answers
2
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

ewwhite
- 197,159
- 92
- 443
- 809