GC can cause lag and log off users when clearing memory?

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

Moderators: Lapo, Bax

kenfalco73_
Posts: 3
Joined: 26 Jun 2021, 06:08

GC can cause lag and log off users when clearing memory?

Postby kenfalco73_ » 27 Jun 2021, 08:44

Hi, we wanted to find out if the GC can cause lag and log off users when clearing memory.
Are there any settings or strategies to apply?
Yesterday around 20:56 we saw that around 150 players were logged out in our game. At that time there were 2250 Online.
From the VisualVm graph that was active(check attached screen), we can see that at that moment there was a peak of the CPU almost 100% and the GC that released about 3 gigs of Ram.
Threads also increased immediately after (we believe to manage users who logged back after being disconnected)

Some details about the system.
Windows Server 2016
64 Giga of Ram
Smartfox 2_17_0
Extension with Custom Login
MySql

Thank you

Gabriel
Attachments
GC.png
(217.38 KiB) Not downloaded yet
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: GC can cause lag and log off users when clearing memory?

Postby Lapo » 27 Jun 2021, 08:48

Hi,
what's the average traffic on you server?
Also have you manually changed the SFS2X's memory settings? If so how?

In any case, no it's highly unlikely that GC activity will cause disconnections. We've never seen it happen, and unless the server is operating under extreme conditions you should not see something like that.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
kenfalco73_
Posts: 3
Joined: 26 Jun 2021, 06:08

Re: GC can cause lag and log off users when clearing memory?

Postby kenfalco73_ » 27 Jun 2021, 16:17

Hi Lapo,
no we haven't changed SFS2X's memory settings.
On average we are about 1-2 megabits in download 3-5 megabits in uploads.
And about 2000-4000 packets per second.

P.S Often when users are logged out this message appears, with all different IPs

25 Jun 2021 | 20: 57: 14,145 | WARN | SFSWorker: Ext: 1 | controllers.v290.ExtensionReqController | | com.smartfoxserver.v2.exceptions.SFSExtensionException: Extension Request refused. Sender is not a User: {Id: 184003, Type: DEFAULT, Logged: No, IP: 109.53.2.28:26234}
com.smartfoxserver.v2.controllers.v290.ExtensionReqController.processRequest (ExtensionReqController.java:93)
com.smartfoxserver.v2.controllers.v290.ExtensionReqController $ 1.run (ExtensionReqController.java:68)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:624)
java.lang.Thread.run (Thread.java:748)

Thank you

Gabriel
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: GC can cause lag and log off users when clearing memory?

Postby Lapo » 28 Jun 2021, 07:34

Hi,
the error message you have reported is likely the cause of the disconnection issue you are seeing, which has nothing to do with garbage collection.

Typically when you see this error something is not working right in your Login Extension.
Can you briefly describe how logins are validated? Does your login logic reside on SmartFoxServer or do you call other external services?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
kenfalco73_
Posts: 3
Joined: 26 Jun 2021, 06:08

Re: GC can cause lag and log off users when clearing memory?

Postby kenfalco73_ » 29 Jun 2021, 07:56

Hi Lapo, I have privately attached our Login code.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 31 guests