[Bug]: KeepSpawnInMemory always true
BreadChaser opened this issue · 29 comments
/mv version -p
output
https://paste.gg/adf08fbf7cc0444dbb3f4ee96c4b2a9d
Server logs
https://paste.gg/p/anonymous/53e8f3b8627a4f1ebc85d15f8c8ead43
Server Version
This server is running Paper version 1.21-38-master@1f5db50 (2024-06-27T20:15:58Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
Bug Description
Upon Launching the server or using MV reload in 1.21 paper, it will reset the world config to defaults. It doesnt matter if you mess with it in the config file or use /mvm set it will reset whatever changes you made when using the commads or changing the config, with the server open or not. With more testing it seems most setting works but the KeepSpawnInMemory does not change when trying to set the property, and will reset itself on server launch, even if you set it manually when the server is shut down.
the only setting I see not resetting is Gamemode for some odd reason.
Steps to reproduce
- Make a configuration change in Worlds config file.
- Launch server, the config with be reset
Agreements
- I have searched for and ensured there isn't already an open or resolved issue(s) regarding this.
- I was able to reproduce my issue on a freshly setup and up-to-date server with the latest version of Multiverse plugins with no other plugins and with no kinds of other server or client mods.
Related, 4-year-old issue:
#2443
All my keepSpawnInMemory entries get reset to true on server load.
running mvm set keepspawninmemory false [world] does NOT change them back.
mvm set keepSpawnInMemory false creative
[08:14:00 INFO]: Success! Property keepSpawnInMemory was set to false
[Multiverse-Core] Version 4.3.12 (API v24) Enabled - By dumptruckman, Rigby, fernferret, lithium3141 and main--
( same happens with Multiverse-Core Version: 4.3.1-b861)
Paper version 1.20.6-147-ver/1.20.6@e41d44f (2024-06-17T19:24:35Z) (Implementing API version 1.20.6-R0.1-SNAPSHOT)
In the logs, this happens at about the time the Multiverse-Core message shows up, or abot when the message "World(s) loaded." appears.
Changing entries to false in the config, and then manually running a mvm set to false changes ALL worlds to true in the config. Not just the world I'm editing.
I can reproduce this, and it's quite an issue if you can't set keepSpawnInMemory=false anymore and have a lot of worlds that are all ticking (tested with multiverse-core 4.3.12 and mc paper-1.20.6-148)
Getting the same issue with keepSpawnInMemory using multiverse-core-4.3.12
and paper-1.20.6-148
. I also tested the issue on a blank Paper server with no plugins other than Multiverse-Core, it happens there too.
I've tested other world settings (such as autoLoad, hunger, weather...), those work fine, keepSpawnInMemory is the main one that keeps resetting for me.
If I use /mvmodify set keepSpawnInMemory false <world>
, /mvinfo <same world>
shows Keep spawn in memory: true
. Similarly, if I edit worlds.yml
manually while the server is offline, all keepSpawnInMemory flags are reset to true
as soon as the server loads (or, if autoLoad=false for the world where keepSpawnInMemory=false, keepSpawnInMemory turns true
for that world after loading it with /mvload
).
Furthermore: I tried to replicate this in paper-1.20.4-497
(last stable release for Minecraft 1.24), and paper-1.20.5-4
(first stable release for Minecraft 1.20.5). Setting keepSpawnInMemory=false works as expected in 1.20.4-497, but is broken in 1.20.5-4.
In regards to OPs issue, i cant reproduce issue with most world settings when using the /mvm set
command. Nor can i reproduce when stopping server and changing config values in worlds.yml
.
However can confirm keepSpawnInMemory
resets to true
.
This has been an issue since 1.20.5 (maybe earlier), but can be individually rectified by adding:
spawn:
keep-spawn-loaded: false
into the individual worlds paper-world.yml
file.
paper-world.yml
What if the server core I am in does not have paper-world.yml?
Not everyone uses the Paper core
How can I confirm if the keep-spawn-loaded worked or not? I changed keep-spawn-loaded to false in config/paper-world-defaults.yml and edited all the keepSpawnInMemory to false in Multiverse-Core/worlds.yml while the server was stopped.
I restart the server and Multiverse-Core/worlds.yml is re-written with all the keepSpawnInMemory set to true when Multiverse-Core loads all the worlds.
In regards to OPs issue, i cant reproduce issue with most world settings when using the
/mvm set
command. Nor can i reproduce when stopping server and changing config values inworlds.yml
.However can confirm
keepSpawnInMemory
resets totrue
.This has been an issue since 1.20.5 (maybe earlier), but can be individually rectified by adding:
spawn: keep-spawn-loaded: false
into the individual worlds
paper-world.yml
file.
To my knowledge, since version 1.20.5+, the option "keep-spawn-loaded: false" seems to have been removed from Pape
This could probably also be achieved with the new spawn chunks gamerule
Gamerule keeps resetting after each server restart when using MV.
At the console:
mvrule spawnChunkRadius 0 creative
Does seem to work, however keepSpawnInMemory still shows as true. My guess is that this setting is ignored in 1.20.5+
Using mvrule spawnChunkRadius 0 [world]
returns a success message, but after a server restart the chunks are loaded again, according to cmi /status (and just by seeing how much memory is used, but that doesn't really qualify as proof).
Same result as using the /gamerule command with multiverse installed.
When I use /gamerule without multiverse installed, I get the desired result: /status reports 0 chunks loaded per world.
Are you setting it with
/mv gamerule
?
Same result with both /gamerule and /mv gamerule.
道理我都懂😂但是什么时候作者大人能修复啊?
我现在靠着一个自制的插件,在服务器刚刚启动时TPS低于阈值执行/mvm 将区块卸载,但是这会导致每次TPS低于16都会执行一次
In regards to OPs issue, i cant reproduce issue with most world settings when using the
/mvm set
command. Nor can i reproduce when stopping server and changing config values inworlds.yml
.
However can confirmkeepSpawnInMemory
resets totrue
.
This has been an issue since 1.20.5 (maybe earlier), but can be individually rectified by adding:spawn: keep-spawn-loaded: false
into the individual worlds
paper-world.yml
file.Did you see this, as an alternative.
In my setup, at least, this config option seems to be completely ineffective. I'll have a go at using it on a bare server soon and see if it does anything there.
Update: tested it on a server (purpur 2298 1.21.1) with no plugins; the number of chunks loaded in the end (only world I changed the setting for) is only 10, compared to the 49 chunks per world normally, but still it's not zero. Loaded chunks for the nether on this brand new server are only three, and I didn't even change any settings there.
are there any news on this issue? Server keeps lagging as all spawns stay loaded and ticking :(
any workaround?
tx
In regards to OPs issue, i cant reproduce issue with most world settings when using the
/mvm set
command. Nor can i reproduce when stopping server and changing config values inworlds.yml
.However can confirm
keepSpawnInMemory
resets totrue
.This has been an issue since 1.20.5 (maybe earlier), but can be individually rectified by adding:
spawn: keep-spawn-loaded: false
into the individual worlds
paper-world.yml
file.
Did you see this, as an alternative.
This is happening on my server as well. /mv gamerule spawnChunkRadius set to 0 solves the loaded chunks issue until a server restart, then resets the property back to 2 automatically. Same with the keepSpawnInMemory property, though the /mvmset doesn't actually even change the property at all. I've edited the actual worlds.yml file while the server is offline, and that also gets instantly reset when the server is restarted. The "keep-spawn-loaded" fix doesn't actually reduce the loaded chunks for me ostensibly at all. In servers with a lot of worlds, this creates a boat load of loaded chunks, and is pushing me over my allocated RAM constantly. Any updates on this/workarounds would be greatly appreciated!
Edit: My stupid duct-tape solution was to run the gamerule command for every world at server start with a plugin that runs commands automatically. It works... but a proper solution would probably be better!
Using /mv modify set keepspawninmemory false world
does appear to unload the chunks when I check with /paper chunkinfo
But when I use /mvinfo world
it shows keepSpawnInMemory as true. When restarting the server, it's true and loads.
Seems like there is a change in the way it works in 1.20+, there is a new gamerule spawnChunkRadius that you can use. Can people affected by this issue try /mv gamerule spawnChunkRadius 0 <worldname>
This could probably also be achieved with the new spawn chunks gamerule
@benwoo1110 this has already been tried
mvgamerules grief
in the list I see "spawnChunkRadius: 2"
mvgamerule spawnChunkRadius 0 grief
[22:44:56 INFO]: Success! Gamerule spawnChunkRadius was set to 0.
mvgamerules shows it changed. Restarting the server sets all world spawnChunkRadius back to 2.
What does spawnRadius do? that's also in the list set to 10.
I have report the bug to spigot, let see how it goes
https://hub.spigotmc.org/jira/browse/SPIGOT-7915
Update: I have tested the fix in spigot and it works, now is up to paper to update upstream... hopefully soon
Update: I have tested the fix in spigot and it works, now is up to paper to update upstream... hopefully soon
any news on this? Change has not been pushed pushed upstream yet. Does anybody know how long this usually takes?
Update: I have tested the fix in spigot and it works, now is up to paper to update upstream... hopefully soon
is this commit what you were waiting for??