RoomExtensionSettings Consume Too Much Metaspacesize

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

ersindemir
Posts: 30
Joined: 30 Apr 2016, 07:23
Location: Turkey

RoomExtensionSettings Consume Too Much Metaspacesize

Postby ersindemir » 03 Jun 2023, 19:03

If I create too much room and set the RoomExtensionSettings, Smartfoxserver uses too much metaspace size. This is because the new RoomExtensionSettings uses a Java ClassLoader. Is there any option in Smartfoxserver to create new RoomExtensionSettings without using the ((java.lang.String id, java.lang.String className) constructor)? Or do you think adding a new constructor method without using a class loader would be a better option?

SmartfoxServer : v2.17.3
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: RoomExtensionSettings Consume Too Much Metaspacesize

Postby Lapo » 04 Jun 2023, 10:21

Hi,
Extensions attached to a Room are loaded in a separate class loader, which uses more meta-space as you have mentioned but also allows to re-deploy an Extension at runtime without having to restat the server.

If you don't care about the latter, you can deploy your Extensions under the extensions/__lib__/ folder. In this case no extra class loaders will be used (and you will need a restart after a redeploy).

You can read more details about the use of Class Loaders here:
http://docs2x.smartfoxserver.com/Extens ... assLoading

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Google [Bot] and 50 guests