Memory leak in all servers on pterodactyl 1.11.7
I'm having a memory leak on all servers on my node. Memory just keeps building up, both in
btop
and the pterodactyl panel and it never goes back down. It just keeps increasing until an eventual crash. I've allocated an extra GB of RAM on top of my overhead to just slow down the crashes but that is a bandaid. Please help.
GC log attached and here are my flags for my SMP:
I've allocated 10GB of RAM just to keep it from crashing. The proxy server is more detrimental because when it crashes, well you know what happens. RIP all those new players. Here are the flags for that:
As you can see I've been experimenting with removing/adding -XX:+AlwaysPreTouch
but it doesn't seem to make a difference.
Spark report for the SMP: https://spark.lucko.me/MuOCMTpVyn
@Jared | InfraCharm Skullian told me to ping you (sorry)spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
54 Replies
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
✅ Your server isn't lagging
Your server is running fine with an average TPS of 20.
Requested by torrentstaff • Page 1 of 4
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by torrentstaff#0
Your number of entities is very large
Everything looks just fine memory wise
agreed
yeah that's definitely something I need to watch out for, but doesn't explain why memory just keeps building up and never gets cleared
that's my damn problem; can't identify what the fuck is causing this to happen
like afaik, a proxy server should not need 2+ GB to function with a small player count
and the memory usage should go up and down, not just go up and up and up and up
No
Panel can only see and act on whatd allocated
Nvm
...
it is not normal for memory to keep increasing until it crashes
i could increase the allocation to 20GB on the SMP, it would still keep building up and then crash
Xmx is set to 7.5GB
Shouldnt go that far, whats have you allocated currently
I had it on 1.5GB overhead; which is recommended and works for most situations afaik, but it kept crashing, so now the allocation is 2.5GB higher than Xmx
so 7.5 -> 10
it is currently at 8.45 but i guarantee it will increase past 9 within like 30-45 minutes
I NEED to get this sorted so I can have 1.5GB overhead for each server max, and like 500MB for the proxies
There is something called native memory spark cant see and gc doesnt touch, but its done by plugins and dont know how to check or troubleshoot
It's your GC, it's taking 14.5 seconds to run causing MSPT to drop.
Is there something I can do with the flags to fix that?
Yes
I am all ears for any recommendation. I've tried every set of flags out there; etil's, shenendoah, etc
Add
-Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
to your startup flags. Send me the gc.log that gets generated after 15 mins along with a new 15m spark report
I'll send you an optimized set of flags
Aikars is trashok I have that flag on the SMP already, I will generate a new spark
shall I do that for all servers or can you make do with one?
Each server will need its own set of optimizations.
ok bear with me, thank you
@Jared | InfraCharm spark report for SMP: https://spark.lucko.me/e06FHyNGQj
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
gc.log
Requested by torrentstaff
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
✅ Your server isn't lagging
Your server is running fine with an average TPS of 20.
Requested by torrentstaff • Page 1 of 4
What are your startup flags
Great, and what are your panel container settings for this server?
Like memory, threads, stuff like that
Java 21
Pufferfish 1.21 build 7
https://spark.lucko.me/tMSoaqsEtI Lifesteal server
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
gc_1.log
Requested by torrentstaff
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
✅ Your server isn't lagging
Your server is running fine with an average TPS of 20.
Requested by torrentstaff • Page 1 of 4
For SMP.
If a flag does not allow your server to start, remove the flag and let me know which one it was so we can substitute it.
Send me a new gc.log and spark report in 60 minutes
Startup flags
java -Xms6656M -Xmx6656M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M -jar server.jar --nogui
and container settings
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
message.txt
Requested by torrentstaff
oh i missed something lol
I forgot to add the jar file
am an idiot
it's starting
For Lifesteal.
If a flag does not allow your server to start, remove the flag and let me know which one it was so we can substitute it.
Send me a new gc.log and spark report in 60 minutes
Oh just have to add -XX:+UnlockExperimentalVMOptions to lifesteal
No...
Getting rid of aikars flags entirely
that's uhh what it said in console
Ah okay
XX:+UnlockExperimentalVMOptions
It's in there already
Unrecognized VM option 'AggressiveOpts'
Thanks, remove it
We were trying to make GC take precedence
Lifesteal started
Waiting for the proxy profiler to come back
thanks so much for your help Jared
Yep
No worries
Jared, Lifesteal just crashed; had 8.5GB allocated to the container
with these flags:
@Jared | InfraCharm https://spark.lucko.me/s8eMADoYIS this is my 2nd proxy server
gc log is attached, as well as build config. Using these flags:
Ideally I'd like the allocated memory to be 1.5G for both proxies
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
gc_2.log
Requested by torrentstaff
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Velocity
Requested by torrentstaff
This was quite a long spark report, but I ran it on the SMP after changing the flags to your recommendations: https://spark.lucko.me/8YiJ7lddTG
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
✅ Your server isn't lagging
Your server is running fine with an average TPS of 20.
Requested by torrentstaff • Page 1 of 4
Idk how this is possible, but switching to a custom docker image using graalvm fixed it…
Thanks Skullian. Anyway !close
!solved
post closed!
The post/thread has been closed!
Requested by torrentstaff#0