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
Memory leak with cache #2360
Comments
How often do you restart your server? I'm interested how this number grew. Do you have a lot of island resets? |
There has been work done recently on the memory structures in the IslandCache code (it hadn't been touched for 6 years) and I found some bugs where islands would not be fully removed from the grid so I cleaned it up recently. Would you be able to move to the latest BentoBox build? |
i am still running under 1.20.1 i'm not sure if bentobox latest can run on this version , and i'm doing daily restarts |
Yes, it'll work with 1.20.1. |
nice, is there a list of changes from my version to the lastest ? since i edited all lang files and stuff i wants to be sure to know what changed |
did not got any OUt of memory since i updated bentobox, i'll do an heapdump when there is less players |
this heapdump was made when there was 110 players online |
Can you check what version of BentoBox you are running? The head dump shows a field called So, could you still be using an older build? |
That explains it. That's the release version but the changes are in 2.4.0-SNAPSHOT. You can download the latest from https://ci.codemc.io/job/BentoBoxWorld/job/BentoBox/ However SNAPSHOTs are not released and may be unstable so of course, if you use it then take backups. |
well i dont reallly want to break my server , is it really unstable ? or only a few small bugs |
i uploaded the latest CI version we will see tomorrow at server restart |
lets hope it doesnt break slimefun im not using the latest version cuz we edited it to translate it since we cant translate the plugin without changing the code |
updated and did an heapdump again and it seems the field is not here anymore but bentobox still uses a lot of memory the good thing is that there is less entries than before which means we already have an improvement |
How many islands do you actually have in the database? They would be in the Islands table. |
around 12.5k islands |
I reviewed some heap dumps and I don't see a "memory leak" per se, but the cache does load all the islands in at startup so there were a lot of Island objects in there. Previously, the islands were stored in 3 maps in IslandCache, and with the lasted PR, now it's just one. In checking the heap dump, this should reduce the memory usage further. |
i'll test this pr at next daily server restart and keep you updated |
Expected behavior
analyzing a heapdump showed me 172k entries on cache which seems to be a lot considering there is only 12k islands on my server , we have no auto purge enabled
https://discord.com/channels/272499714048524288/310623455462686720/1238209472015503381 after talking here on discord with BONNe he told me to open an issue on github
Observed/Actual behavior
i can give you in private a link to download the heapdump if needed
Steps/models to reproduce
N/A
BentoBox version
bbox ver
[21:28:00 INFO]: Serveur Invalide (UNIVERSESPIGOT) 1.20.1.
[21:28:00 INFO]: Version de BentoBox : 1.24.1-SNAPSHOT-b2435
[21:28:00 INFO]: Base de données : MARIADB
[21:28:00 INFO]: Mondes de jeu chargés :
[21:28:00 INFO]: oneblock_world (OneBlock) : Overworld
[21:28:00 INFO]: Addons chargés :
[21:28:00 INFO]: AOneBlock 1.14.1 (ENABLED)
[21:28:00 INFO]: Bank 1.7.0-SNAPSHOT-b83 (ENABLED)
[21:28:00 INFO]: Biomes 2.2.0-SNAPSHOT-b251 (ENABLED)
[21:28:00 INFO]: Chat 1.1.4 (ENABLED)
[21:28:00 INFO]: ControlPanel 1.13.1-SNAPSHOT-b61 (ENABLED)
[21:28:00 INFO]: Level 2.13.0-SNAPSHOT-b565 (ENABLED)
[21:28:00 INFO]: Likes 2.4.0-SNAPSHOT-b97 (ENABLED)
Plugin list
No response
Other
No response
The text was updated successfully, but these errors were encountered: