Hey all
I have recently been having problems with my horizons server freezing up, still trying to track down the cause, but that's not the issue here. Due to those crashes, I decided it would be nice to set up some kind of auto-recovery script that will detect if the client is crashed and restart it if need be.
Now, if the actual java process has died that is pretty simple, just check if the pid is still active and restart if not. However, most of the crashes I have been getting were actually not crashing the process, the process was just hanging and bogging up the CPU of my server.
I'm thinking of maybe checking the timestamp of the last log message, that should never be more than 5 minutes due to autosaving, but that seems a bit clunky.
Does anyone have a good way of dealing with the problem?
I have recently been having problems with my horizons server freezing up, still trying to track down the cause, but that's not the issue here. Due to those crashes, I decided it would be nice to set up some kind of auto-recovery script that will detect if the client is crashed and restart it if need be.
Now, if the actual java process has died that is pretty simple, just check if the pid is still active and restart if not. However, most of the crashes I have been getting were actually not crashing the process, the process was just hanging and bogging up the CPU of my server.
I'm thinking of maybe checking the timestamp of the last log message, that should never be more than 5 minutes due to autosaving, but that seems a bit clunky.
Does anyone have a good way of dealing with the problem?