DRE2N / DungeonsXL

Create custom dungeons and adventure maps with ease!
https://www.spigotmc.org/resources/dungeonsxl.9488/
GNU General Public License v3.0
154 stars 83 forks source link

Dungeon instances/worlds not unloading from memory/releasing RAM #1081

Closed Guildedcraft closed 2 years ago

Guildedcraft commented 2 years ago

(Please follow this template, as doing so saves both you and me a lot of time. Issues that don't follow the template may be closed.)

Description DungeonsXL worlds don't seem to release RAM when they are finished being used. On top of this, or potentially the cause of this, every time someone enters a dungeon, it starts a new instance, even if nobody else is in that dungeon. For example, a player runs a dungeon. It starts DXL_GAME_0. That player then finishes it (or washes out, either way) and then 10 minutes later, another player runs a dungeon. Instead of loading a new DXL_GAME_0, since it should have been unloaded, it starts a DXL_GAME_1, ad infinitum. I am also getting warnings from multiverse when all players have left from an instance that the world is still loaded in memory. P.S.: This is on the dungeonsxl-dist-0.18-PRE-02 version

Reproduce 1: Set up a dungeon 2: have a player run the dungeon 3: let that player finish the dungeon 4: have another player run the dungeon 5: Watch server RAM usage keep rising

Expected behavior What I expected was once that DXL_GAME_X world was finished being used, it would un-load from the server memory, and thus release RAM/ game numbers would be re-used, but that's not an issue for me as long as I can get the RAM to be released.

Screenshots / GIFs / videos This is the multiverse warning image

Sataniel98 commented 2 years ago

every time someone enters a dungeon, it starts a new instance, even if nobody else is in that dungeon. For example, a player runs a dungeon. It starts DXL_GAME_0. That player then finishes it (or washes out, either way) and then 10 minutes later, another player runs a dungeon. Instead of loading a new DXL_GAME_0, since it should have been unloaded, it starts a DXL_GAME_1, ad infinitum.

This is by design. Every time the dungeon is played, it gets a new instance sothat changes from earlier games are reset and groups can play the same dungeon simultaneously in separate instances. IDs are never reused because loading a world with a name, unloading it and reloading a new world with the same name causes issues in Minecraft 1.14 and higher.

I am also getting warnings from multiverse when all players have left from an instance that the world is still loaded in memory.

Multiverse actually sends this message when it loads a world. It means the world has been loaded by Bukkit but isn't registered in Multiverse, and rightfully so because there is no need for Multiverse to handle DXL worlds. You can safely ignore it.

DungeonsXL worlds don't seem to release RAM when they are finished being used.

This however is not by design. Does it happen without other plugins that might keep the world alive?