minecraft-server-hibernation icon indicating copy to clipboard operation
minecraft-server-hibernation copied to clipboard

minecraft server considered crashed by watchdog (AllowSuspend=true)

Open gekigek99 opened this issue 2 years ago • 12 comments

Current Behavior (🐛 Bug)

minecraft server considered crashed by watch dog when process is unsuspended. (don't know if it's just a log or it implies some unexpected behaviour from ms)

Expected Behavior

just log that the server is overloaded and running way behind with ticks.

Steps to Reproduce

set AllowSuspend to true, let the server be frozen and then unsuspend it.

It might not happen all the time: probably only happenss when the server is frozen and forceful freeze is sent (with stop command).

possible solution is setting/checking for max-tick-time=-1 in server.properties (when AllowSuspend is set to true)

MSH Logs

server crashed when unsuspending

MSH-Version

2.4.6

Operating system

linux

Minecraft Version

1.18.2

Minecraft Server Software

vanilla

Is there an existing issue for this?

  • [X] I have searched the existing issues before opening this issue.
  • [X] I have provided all relevant details.

gekigek99 avatar Apr 20 '22 00:04 gekigek99

this problem was already addressed by @Br31zh in this comment of issue #51

gekigek99 avatar Apr 20 '22 14:04 gekigek99

log of server:

  • paper server
  • 3 min of process tree suspension
  • server.properties -> max-tick-time=-1

gekigek99 avatar May 14 '22 18:05 gekigek99

@Br31zh does it happen also to you? how do you prevent that?

gekigek99 avatar May 14 '22 18:05 gekigek99

setting timeout-time: -1 in spigot.yml prevents the ms crash report partially but not the server restarting

log of server:

  • paper server
  • 3 min of process tree suspension
  • server.properties -> max-tick-time=-1
  • spigot.yml -> timeout-time: -1

gekigek99 avatar May 14 '22 18:05 gekigek99

I’m using a fabric server, not a spigot or paper one. So server.properties -> max-tick-time=-1 is a sufficient configuration to prevent it crashing (it’s the same for a vanilla server).

Here is my log with my own system, and my fabric server: https://haste.breizh.pm/buzodigoru.txt (and you can see that it suspend / resume the server a bit too much, that’s why I call it shaky).

So I can’t help you here, sorry.

Br31zh avatar May 14 '22 19:05 Br31zh

Ah ok thanks anyway for that info!

I think that all that Can't keep up! Is the server overloaded? it's fine and inevitable... If the players can play it's good

gekigek99 avatar May 14 '22 19:05 gekigek99

setting restart-on-crash: false in spigot.yml prevents the ms shutdown/restart

log of server:

  • paper server
  • 2 min of process tree suspension
  • server.properties -> max-tick-time=-1
  • spigot.yml -> timeout-time: -1
  • spigot.yml -> restart-on-crash: false

this seems to solve it (there is still the crash report but the player is able to instantly join the server)

gekigek99 avatar May 14 '22 19:05 gekigek99

Yeah, totally, the Can't keep up! Is the server overloaded? is just there to say that the last tick was too long (it took more than 50ms, of course since the process was frozen).

Here is the log when a player join the game: https://haste.breizh.pm/aloyosukil.txt

So yeah, if the server work flawlessly after resuming, even with some warnings in the logs, it’s ok.

Br31zh avatar May 14 '22 19:05 Br31zh

what is the longest time the server can be suspended without crashing when restarting? because i tryed resuming it after 20h but it crashed i think.

gekigek99 avatar May 15 '22 15:05 gekigek99

It never crashed here, even after more than 24h (in 1.16, before I change the way I’m suspending it). I just had the Can’t keep up message. If it’s still with paper / spigot, then maybe that’s the problem.

But I don’t have these timing often, since it’s on my personal computer (I shutdown or reboot it manually almost every day).

Br31zh avatar May 15 '22 17:05 Br31zh

My server keeps crashing even though I changed the following settings:

paper server (1.19), 5 min of process tree suspension

file variable
server.properties max-tick-time=-1
spigot.yml timeout-time: -1, restart-on-crash: false
bukkit.yml warn-on-overload: false
paper-global.yml early-warning-delay: -1, early-warning-every: -1

Here is the paper-log

I guess it's because of the 1.19. The Hibernate plugin also no longer works.

MarkBremer avatar Jul 06 '22 17:07 MarkBremer

Thanks for reporting.

I'm aware of this problem, but don't really know how to fix it.

For the time being you can use AllowSuspend=false

gekigek99 avatar Jul 07 '22 23:07 gekigek99

planning to solve it with a sort of "suspension refresh function" that the user can set.

not ideal, but playing with single threads and watchdogs its pretty tricky...

reminder: add a start flag for this new config parameter

gekigek99 avatar Nov 28 '22 19:11 gekigek99

fixed in 5fcf9b80bc333e90bb4b37d17957944b90bc365f

this is not the "golden" solution but does the job while keeping resources usage to a reasonably low amount

@Br31zh @MarkBremer can you test it?

gekigek99 avatar Dec 01 '22 01:12 gekigek99