Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player loading & Advancements memory leak #73

Closed
Jikoo opened this issue Aug 10, 2017 · 5 comments · Fixed by Jikoo/OpenInv#104
Closed

Player loading & Advancements memory leak #73

Jikoo opened this issue Aug 10, 2017 · 5 comments · Fixed by Jikoo/OpenInv#104
Assignees

Comments

@Jikoo
Copy link
Collaborator

Jikoo commented Aug 10, 2017

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.

@Jikoo Jikoo added the Bug label Aug 10, 2017
@Jikoo Jikoo self-assigned this Aug 10, 2017
@RoboMWM
Copy link

RoboMWM commented Aug 10, 2017

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
Copy link
Collaborator Author

Jikoo commented Aug 10, 2017

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
Copy link

RoboMWM commented Aug 11, 2017

Yea, he was also spawning entityplayers or something.

@Jikoo Jikoo changed the title 1.12 memory leak Player loading & Advancements memory leak Oct 1, 2019
@Jikoo
Copy link
Collaborator Author

Jikoo commented Apr 19, 2020

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 Jikoo closed this as completed Apr 19, 2020
@Jikoo Jikoo reopened this Oct 4, 2022
@Jikoo
Copy link
Collaborator Author

Jikoo commented Oct 4, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants