SFS2X Server is crashing due to Building up of heap memory overtime

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

Moderators: Lapo, Bax

rahulsamaddar
Posts: 1
Joined: 16 Nov 2018, 06:21

SFS2X Server is crashing due to Building up of heap memory overtime

Postby rahulsamaddar » 16 Nov 2018, 07:19

We have built a P2P game.
We are using SmartFox 2X server, We have written a zone extension using
java which creates rooms and adds an extension to them dynamically, each
room contains up-to 5 players for 1 game and rooms gets destroyed after a
game (A game takes 2-3 minutes) We are using TaskScheduler
(SmartFoxServer.getInstance().scheduleAtFixedRate(myTaskrunner, afterWhat,
afterWhat, TimeUnit.SECONDS);) in our room extensions, 9-10 RoomVariable,
and 4-5 UserVariables.

The CCU is 50-60 at any given point of time.

We have tested it On a local machine Intel Core-i5 2.2 GHz with 8Gb RAM
running Ubuntu 18, It is running perfectly fine, the heap never increases
over 120 MB, MAX is 1.89 GB and GC is also clearing out unused resources
and It is working perfectly fine.

Our production server is an EC2 T2.Medium instance the Ram is 4GB, 2VCPUs,
running Ubuntu 16.4 LTS.
Now the problem which we are facing is The heap memory is building up over
time (GC gets called but heap is not clearing out as expected) and it
reaches to max allocated heap memory (921.17 MB) in every 2-3 days, which
is causing a system crash. So our production server is crashing in every
2-3 days.

So it is crashing on production environment in every 2-3 days. Can you help
us with this?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SFS2X Server is crashing due to Building up of heap memory overtime

Postby Lapo » 16 Nov 2018, 08:31

Hi,
we have already replied to your email. Let's keep the conversation in one place.

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

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 36 guests