barneygale / mark2

minecraft server wrapper, written in python with twisted
Other
105 stars 27 forks source link

Restart if process killed #88

Open vemacs opened 11 years ago

vemacs commented 11 years ago

Spigot's restart-on-crash kills the process, then attempts to launch a script. I just ended up disabling it, but it could be a nice feature, if say, an OOM kills the process or Spigot detects a hang.

barneygale commented 11 years ago

I would appreciate a log of what happens, if you have one handy?

vemacs commented 11 years ago

No error at all, just server stopped.

barneygale commented 11 years ago

To come back to this, I think the solution would be a script with something like "sleep 5; mark2 start". As far as I can tell, if this never gets called, this is a problem with spigot and not mark2.

vemacs commented 11 years ago

Now, if the kernel accidentally kills the process because of an OOM, how would that be handled?

barneygale commented 11 years ago

kills which process? I think spigot fully detaches a child process (running the script) and exits, meaning there's never two mark2 instances or servers running concurrently.

vemacs commented 11 years ago

Not Spigot, the Linux kernel. OOM condition, out of swap and RAM. What happens?