Metaspace is only increasing, not decreasing. Running for 1 week will be full of memory. My game room is constantly being created and deleted.
Room creation configuration
cfg.setDynamic(true);
cfg.setAutoRemoveMode(SFSRoomRemoveMode.NEVER_REMOVE);
I remove the room using the method SmartFoxServer.getInstance().getAPIManager().getSFSApi().removeRoom(room) inside room extension class.
where did i go wrong?
Metaspace is only increasing, not decreasing.
Re: Metaspace is only increasing, not decreasing.
Hi,
at some point the metaspace should also be released. Although it's difficult to predict when, because the GC operates in mysterious ways
If there's a memory leak, usually it is because event/request listeners are not removed correctly when the Extension is released.
The one reason for this is that you implemented a custom destroy() method, but forgot to invoke the super.destroy() method.
In other words:
Cheers
at some point the metaspace should also be released. Although it's difficult to predict when, because the GC operates in mysterious ways
If there's a memory leak, usually it is because event/request listeners are not removed correctly when the Extension is released.
The one reason for this is that you implemented a custom destroy() method, but forgot to invoke the super.destroy() method.
In other words:
Code: Select all
@Ovveride
public void destroy()
{
super.destroy();
// ... custom code here ...
}
Cheers
Re: Metaspace is only increasing, not decreasing.
I don't implement a custom destroy() method.
The fact is that the GC is called but the metaspace is not cleaned up. after few days will throw exception java.lang.OutOfMemoryError: Compressed class space.
I am very tired about this problem. When a room is removed I see that the objects that follow it have been cleaned but the number of classes loaded has not decreased, leading to an increasingly large metaspace.
The fact is that the GC is called but the metaspace is not cleaned up. after few days will throw exception java.lang.OutOfMemoryError: Compressed class space.
I am very tired about this problem. When a room is removed I see that the objects that follow it have been cleaned but the number of classes loaded has not decreased, leading to an increasingly large metaspace.
Re: Metaspace is only increasing, not decreasing.
Hi,
you can deploy the Room Extension(s) under the extensions/__lib__/ to avoid the problem entirely.
See the documentation here:
http://docs2x.smartfoxserver.com/Extens ... assLoading
With this approach the Room Extension classes will be loaded by the top class loader.
Cheers
you can deploy the Room Extension(s) under the extensions/__lib__/ to avoid the problem entirely.
See the documentation here:
http://docs2x.smartfoxserver.com/Extens ... assLoading
With this approach the Room Extension classes will be loaded by the top class loader.
Cheers
Re: Metaspace is only increasing, not decreasing.
Lapo wrote:Hi,
you can deploy the Room Extension(s) under the extensions/__lib__/ to avoid the problem entirely.
See the documentation here:
http://docs2x.smartfoxserver.com/Extens ... assLoading
With this approach the Room Extension classes will be loaded by the top class loader.
Cheers
Thanks Rapo! Hope I can fix this problem
Re: Metaspace is only increasing, not decreasing.
I faced the same issue and tried everything. But at the end, the static instance of GSON object was the culprit. I was using it for serializing my object in toString method, I removed it and everything started working perfectly fine.
Who is online
Users browsing this forum: No registered users and 115 guests