SFS2X-RC3 Memory Leak?

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

Moderators: Lapo, Bax

Eviserator
Posts: 5
Joined: 11 Sep 2010, 22:35
Location: Woodbridge, VA
Contact:

SFS2X-RC3 Memory Leak?

Postby Eviserator » 26 Dec 2011, 18:14

I have been running out of memory after just a few hours of running and have spent many hours looking for a memory leak. Finally I just decided to start testing the very basics so I cleared deleted all the zones and all the extensions so I would just have SFS2X as the only JAVA based software running on my server.

Here is my test setup:

1. Mac Mini Server, 8GB RAM
2. Mac OS Lion Server 10.7.2
3. SFS2X-RC3 (no zones, no extensions)

You can watch this video which I captured SFS2X just eating memory over time. I really need to know if this is real or not as it is really keeping us from developing and deploying our game.

VIDEO: http://www.youtube.com/watch?v=vFlVdpsh38A
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 26 Dec 2011, 21:34

Hi,
thanks for the video, unfortunately just watching a system monitor window doesn't help very much.
The best thing to do to find out what is going on is pluggin VisualVM and checking which classes are eating up the memory. If you are running server side Extensions you should point your attention to your code and see if it's not leaking somewhere.
Lapo
--
gotoAndPlay()
...addicted to flash games
ndesy
Posts: 33
Joined: 18 Feb 2008, 21:41
Location: Montreal

Postby ndesy » 27 Dec 2011, 19:32

It is normal for a java application to eat up memory over time. The garbage collector won't clean up the old generation until it needs to.

What is your heap size (ie. -Xmx) and what happen when the heap is full? OutOfMemoryException or the memory usage decrease?
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 27 Dec 2011, 20:53

The easiest way to see the memory state is simply by connecting with the AdimnTool. You will notice that memory goes up and down after some time, as ndesy pointed out this is common for any garbage collected language.
Lapo

--

gotoAndPlay()

...addicted to flash games
mente
Posts: 73
Joined: 14 Apr 2011, 14:27

Postby mente » 28 Dec 2011, 10:57

We're running SFS2x for days without memory leaks. However we're not in production yet and max what we have is 3 users online :)
ndesy
Posts: 33
Joined: 18 Feb 2008, 21:41
Location: Montreal

Postby ndesy » 28 Dec 2011, 16:56

We've been using sfs2x in production for the past 3 months (~6k ccu).

I wouldn't say there is no issues but there is no memory leak. In fact sfs2x memory footprint is very low.

We had memory leaks at first, but that was an error that was introduced in our extension when we migrated from smartfox1 to sfs2x. We easily detected the leak by using JRockit memory leak detector.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Baidu [Spider] and 72 guests