Auto restart server on freeze


For quite a lot of time already I’m trying to fix my server: from time to time, it just freezes (stops producing console output/receiving input and becomes invisible for players while dropping everyone). I couldn’t find the solution yet, so I want to be able to automatically restart it when this happens.

Restarting on crash is fairly easy, however, as I stated above, this kind of ‘hangs’ is something other than regular crashes. Is there a reliable way to detect them and autorestart the server?


don’t you already have a thread related to this?

And no, it’s generally not possible to “auto restart on freeze” because well that’s the problem - the server is frozen, not crashed.

I locked that thread because from what I found there’s no real fix to the problem (apart from changing OS or even moving to a different VPS).

So you said, it drops everyone and becomes invisible and won’t accept inputs, so you could try to get a response from the server with some PHP every once in a while and if it doesn’t respond back, restart it?