Player loading & Advancements memory leak #73

Closed
opened 2017-08-10 05:39:40 -04:00 by Jikoo · 5 comments
Jikoo commented 2017-08-10 05:39:40 -04:00 (Migrated from github.com)

Not sure if this was an issue with achievements, but advancements load each time a player is loaded, then never get garbage collected. Need to look into the logout process more to complete cleanup. Shouldn't present an issue to the average user, takes 1000+ player loads to make a real impact.

Not sure if this was an issue with achievements, but advancements load each time a player is loaded, then never get garbage collected. Need to look into the logout process more to complete cleanup. Shouldn't present an issue to the average user, takes 1000+ player loads to make a real impact.
RoboMWM commented 2017-08-10 16:00:28 -04:00 (Migrated from github.com)

Hmm I remember someone complaining about advancements with a heap dump in #spigot-dev but eventually he believes he resolved it by discovering someone spamming a packet and rate limiting said packet, as a resolution to his issue. (He also was doing NMS stuff.)

Hmm I remember someone complaining about advancements with a heap dump in #spigot-dev but eventually he believes he resolved it by discovering someone spamming a packet and rate limiting said packet, as a resolution to his issue. (He also was doing NMS stuff.)
Jikoo commented 2017-08-10 17:37:28 -04:00 (Migrated from github.com)

I found this to be an issue when loading players periodically for various checks, ended up having advancements consuming about 30% of the memory used. After reducing periodic checks, memory usage normalized. It's certainly not a concern for the average user, but it should definitely be fixed in case other plugins end up using Player objects provided by OpenInv. The server I'm currently working with has a rather small and consistent player base. I don't think anyone's been doing anything malicious, though I guess I can't entirely rule it out.

I found this to be an issue when loading players periodically for various checks, ended up having advancements consuming about 30% of the memory used. After reducing periodic checks, memory usage normalized. It's certainly not a concern for the average user, but it should definitely be fixed in case other plugins end up using Player objects provided by OpenInv. The server I'm currently working with has a rather small and consistent player base. I don't think anyone's been doing anything malicious, though I guess I can't entirely rule it out.
RoboMWM commented 2017-08-10 21:37:39 -04:00 (Migrated from github.com)

Yea, he was also spawning entityplayers or something.

Yea, he was also spawning entityplayers or something.
Jikoo commented 2020-04-19 11:38:07 -04:00 (Migrated from github.com)

Not sure how this was handled back in 1.12 because I never invested the time to track it down, but in 1.15 there does not appear to be any special handling for advancements.

Not sure how this was handled back in 1.12 because I never invested the time to track it down, but in 1.15 there does not appear to be any special handling for advancements.
Jikoo commented 2022-10-04 08:27:37 -04:00 (Migrated from github.com)

I had assumed this was resolved because I stopped encountering it in later versions, but according to this post it looks like this is as simple as releasing the player's advancement data.

I had assumed this was resolved because I stopped encountering it in later versions, but according to [this post](https://www.spigotmc.org/threads/serverplayer-causing-memory-leak.573072/#post-4480216) it looks like this is as simple as releasing the player's advancement data.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: minster586/OpenInv#73
No description provided.