Mini Memory Leak in plugin?
radek203 opened this issue ยท 10 comments
Oh... yep there is maybe a memory leak! I will investigate more, what tool are you using to monitor that? Maybe some data that are not deleted when a player disconnects, I don't know. Do you have more info when it happens or something?
I use to dump memory: https://www.spigotmc.org/resources/heapdump.1433/
To open it: https://www.eclipse.org/mat/
But I don't know how it arises.
I have found that chests of a player are not removed from the memory when he disconnects looking into a container. But this should never occurs because a player has to close its inventory to disconnect. I will try to do some advanced tests to check whether the context is deleted each time.
Do you use the command /ecp open
to open other player chests (even offlines) frequently? Its maybe due to a problem with the offline player chests loading system.
Do you still have the issue on your server? I have made some tests with multiple players by trying all cases of login / logout and nothing happens (even when using command /ecp open
on offline players). The plugin context still remains empty when all players are disconnected.
On your screen, there is only two entries in the context map, so is there really a problem? But I agree with you that this map stores 3 629 984 bytes of data, that is a large amount. Maybe chests in memory are quite full?
I completely don't know how it arises and when. In recent times, the consumption of the RAM has increased for me and I just dumped the memory
@utarwyn Will it be fixed?
I'm sorry but I don't have any idea why your problem occurs... On my test server I don't have memory issues (I have done a lot of tests). Without more details I think I can't help you...