timvisee / lazymc

💤 Put your Minecraft server to rest when idle.
GNU General Public License v3.0
600 stars 18 forks source link

Sleep/Online Loop #58

Open XBagon opened 1 year ago

XBagon commented 1 year ago

I tried lazymc on a few different servers and while the Fabric server worked flawlessly, the Paper server just needed to be set to not timeout, the Forge server behaved special. It started the server when I tried to join, but after I left it was caught in a loop of endlessly freezing and unfreezing, which I noticed because the CPU usage wasn't getting any lower, after I left. I looked at the lazymc output, which continued on and on like this.

[00:38:48] [Server thread/INFO] [minecraft/ServerGamePacketListenerImpl]: XBagon lost connection: Disconnected
[00:38:48] [Server thread/INFO] [minecraft/DedicatedServer]: XBagon left the game
[00:38:48] [Server thread/INFO] [voicechat/]: Disconnecting client XBagon
>  INFO  lazymc::montior > Server has been idle, sleeping...
 INFO  lazymc::monitor > Server is now sleeping
 INFO  lazymc::monitor > Server is now online
 INFO  lazymc::montior > Server has been idle, sleeping...
 INFO  lazymc::monitor > Server is now sleeping
 INFO  lazymc::monitor > Server is now online
 INFO  lazymc::montior > Server has been idle, sleeping...
 INFO  lazymc::monitor > Server is now sleeping
 INFO  lazymc::monitor > Server is now online
 INFO  lazymc::montior > Server has been idle, sleeping...
 INFO  lazymc::monitor > Server is now sleeping
 INFO  lazymc::monitor > Server is now online

This is forge-1.18.2-40.2.2 on Ubuntu.

EDIT: The Fabric server also crashes due to the tick lasting too long: [Server Watchdog/ERROR]: Considering it to be crashed, server will forcibly shutdown. So setting max-tick-time=-1 is needed.