Bug Closed · Resolved

Possible memory leak issue + encountered queue issue

#3965 opened by Unknown 3 years ago

Unknownreported this bug

Hi MD developers, I have been encountering some possible memory leak issues. I used a test server to test it. When I open and close dungeon over a specific times, the server will crash due to outofmemory error. The only plugins I installed are md and protocollib. I used paper 1.19.2 build 173 and 1.19.3 build 448 and md build 135 for testing. The logs are here: https://pastebin.com/pauDgDjp

For the queue issue, our players reported that sometimes the queue system would stuck, and no one can enter the dungeons or leave the queue. Our server limited 6 instances max. The normal queue situation is: player gets in queue -> player notified that theres a instance limit -> the ready info jumps out(when a instance is freed) -> get in the dungeon normally When a stuck happens: player gets in queue -> player notified that theres a instance limit -> stays in the queue even someone has finished a dungeon.

Unknowncommented

Can 100% confirm the memory leak issue. Opening and closing a dungeon multiple times causes a memory leak (memory usage goes up faster each time), leading to huge performance issues.

Unknowncommented

I haven't been encountering any of these memory leak issues, and I fixed a whole slew of potential memory leak sources long ago... how large is the dungeon in question, and how many times is it opened and closed to produce this issue? There is a very real possibility this is something outside of my control, as my understanding is that Bukkit and its forks (Spigot, Paper, etc.) have some degree of trouble properly letting go of unloaded worlds.

Unknowncommented

From my experience, it doesn't matter how large/complicated the dungeon is. I have dungeons with a small map in a void world consisting of 2 mobs, and given enough instances are opened and closed, the memory usage will eventually increase significantly. The more times instances are created, the higher the memory usage will become. It definitely varies, but it becomes very obvious with ~40 instances.

It would be understandable if it's just a limitation of Bukkit/other forks. However, in that case, it would be nice to have more control over dungeon entries so that we can use those tools in an attempt to mitigate memory leaks. I can think of per-dungeon entry key requirement bypass permissions (which I could use in an external plugin to control dungeon entries depending on how many instances a player has opened), or options to limit joining a dungeon x times in x time period (for those that want a simpler approach), etc...

Unknowncommented

Hey there. For 1.3.1 I made a major effort to combat memory leaks and made significant headway. My understanding is that we've fixed all the memory leaks we can and there should be a very noticeable improvement as of the latest dev builds! Please give them a try and let me know if you're still seeing major memory bloat caused by Mythic Dungeons.

Something to note, is that it is possible for other plugins to cause Mythic Dungeons to memory leak, as any plugin that holds on to the dungeon world or anything in it could keep the world loaded in memory.

Unknowncommented

Forgot to close this, oops! Feel free to re-open the issue if you continue to encounter crippling memory leaks, bearing in mind the above explanation.

Sign in to join the discussion.