Adding javaagent in sfs2x-service file in Smartfox_Server_2x

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

Moderators: Lapo, Bax

DeepakSharma
Posts: 5
Joined: 09 Oct 2020, 10:48

Adding javaagent in sfs2x-service file in Smartfox_Server_2x

Postby DeepakSharma » 07 Jul 2021, 14:44

Hi Team,
I am trying to add elastic APM javaagent into smartfox_server_2x (currently using 2.16) under sfs2x-service file.
But when I run the sfs2x-service start command The server does not start. Kindly suggest the correct way of adding javagent flag.
Below is the config snippet which I used in sfs2x-service file.

INSTALL4J_ADD_VM_PARAMS=" -javaagent:"/home/sumit/elastic-apm-agent-1.24.0.jar" -Delastic.apm.service_name=dummy_service -Delastic.apm.elastic.apm.capture_body=true -Delastic.apm.secret_token=xyz -Delastic.apm.environment=development -Delastic.apm.server_url=http://localhost:8200 -Xms2048M -Xmx2048M -XX:MetaspaceSize=2048M -XX:MaxMetaspaceSize=2048M -XX:+UseG1GC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=15 -XX:GCLogFileSize=12M"
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Adding javaagent in sfs2x-service file in Smartfox_Server_2x

Postby Lapo » 07 Jul 2021, 16:07

Hi,
you should not edit or touch the service launch file.
Instead you can add all the extra JVM parameters to the sfs2x-service.vmoptions file found in the same location.

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

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 40 guests