I have sfs version 2.20.3 I have made new features to one of my games. I deployed the jar 5 days laters very strage thing happenned that I have never encaunter before heap stayed down started making horizontal line. When users started complaining that games are freezing I checked and cpu was high and heap was not making sigzag it stuck at 480 mb was not going up I have waited and tried to collect evidence for a while and in the morning ai suggested that I should change vm options and restarted sfs at morning.
-Xms8g
-Xmx8g
-XX:MetaspaceSize=1g
-XX:MaxMetaspaceSize=6g
-XX:+UseG1GC
-XX:MaxGCPauseMillis=500
-XX:ParallelGCThreads=20
-XX:ConcGCThreads=5
-XX:InitiatingHeapOccupancyPercent=70
-XX:NativeMemoryTracking=summary
-XX:+ClassUnloading
-XX:+ClassUnloadingWithConcurrentMark
vm options was like this and I made it
-Xms8g
-Xmx8g
-XX:MetaspaceSize=1g
-XX:MaxMetaspaceSize=2g
-XX:+UseG1GC
-XX:MaxGCPauseMillis=500
-XX:ParallelGCThreads=10
-XX:ConcGCThreads=4
-XX:InitiatingHeapOccupancyPercent=80
I decreased Maxmetaspace basically and this thing happened again this time 2. day users started complaining that game is freezing now I rolled back the vm options now ai suggests metaspace leak .I have another sfs instance another fizical machine it has similar game on it I have made those features on that game and now copied and pasted them to this game. other machine works normal but this machine something is wrong how do I debug it. I have been writing games on sfs for the last 10 years this happened first time. what might cause metaspace leak
Thanks
Heap and Metaspace problem
Re: Heap and Metaspace problem
Hi,
Metaspace is affected when Running lots of Rooms each with its Extension, especially when the Extension is pretty big maybe because of dependencies. Since every Room Extension is by default loaded in a new classloaders you end up with many copies of your Extension class and dependencies, one for each active Room.
Is this the case for your game?
Have you checked the logs for recurring errors? This may help narrow down the issue.
Cheers
Metaspace is affected when Running lots of Rooms each with its Extension, especially when the Extension is pretty big maybe because of dependencies. Since every Room Extension is by default loaded in a new classloaders you end up with many copies of your Extension class and dependencies, one for each active Room.
Is this the case for your game?
How high was the CPU usage?When users started complaining that games are freezing I checked and cpu was high and heap was not making sigzag it stuck at 480 mb was not going up
Have you checked the logs for recurring errors? This may help narrow down the issue.
Cheers