ldtteam / DynView

Small serverside utility to balance load and chunk view distance
GNU General Public License v3.0
22 stars 7 forks source link

Time to stop server increases and compability issue as result #43

Closed maiguel5 closed 1 year ago

maiguel5 commented 1 year ago

Resume: Using "dynview.fabric-1.19-2.4" increases a lot the time that the console of the server takes to finish jobs when you ask to stop, specifically when "Saving World" is printed.

Details of behavior: The total time to stop from the command to console closed usually is around 4 to 6 seconds and with dynview installed goes to more than a minute, maybe two until console closed.

For most situations it is just a little annoying, anyway you are closing or stopping the server... but it is worse if you need it to be express for some reason.

Compatibility Issue I had found that it causes some big problems when used together with restart-server-1.2.0+mc1.19.x-1.20.x, from stop boot process to the corruption of the world (Was tested to break it a few times in purpose, i was testing around 20hours (actively) to be sure what was happening because the automated restarts stop working somehow)

The problem appears because the new instance won't finish the initial load, as some files are being used by the old one, so you have to manually finish the process of both instances (or just the new and wait for the old one to finish himself) and load again (Loosing the restart function at all) (of course without dynview it goes all well restarting)

The biggest of the problems comes when it causes some data to be saved corrupt, because "Restart server" will open a new instance when the previous one was expected to be closed, but as this one is open... both will coexist, the first one yet saving the world and the second one loading the world (and a presumably large number of mods and resources) , so some data will be saved corrupt to the disk.

How to solve

  1. Disabling "chunkunload" in the config file seems to do the trick.
  2. If still find that both instances will be open at the same time, don't use both mods at the same time.

For developers: You know a lot more than me about the topic, i just want to help a bit saying that... probably if you found the cause of the "extra time to stop" everything else will be fine. It seems to have something to do around the slow chunk unloading, Disabling "chunkunload" makes everything to be stopped in the usual times, so maybe it will be solved simple checking if it is enabled when the server ask to stop at all, so you stop the "retarder" and the server can continue the normal flow.