Skip to main content
Participating Frequently
July 15, 2010
Question

Serious memory leaks!

  • July 15, 2010
  • 7 replies
  • 1378 views

Hi Everyone,
I have a FMS 3.5.3 server running an application I developed,My goal is to connect to a php server to get mysql query result.it work well in windows.but in linux cent os 5.3,Memory will always grow fast.
please help me!
Here is mycode(fms):
application.onAppStart = function()
{
NetServices.setDefaultGatewayUrl("http://" + application.config['server_ip'] + "/amfphp/gateway.php");
application.conn_db    = NetServices.createGatewayConnection();
application.map_server = application.conn_db.getService('Server',sResult);
trace("Start ...");
application.checkid = setInterval(Check,1000);
}
sResult.onResult = function(date)
{
return;
}
function Check()
{
application.map_server.checkServer();
}

(php)
function checkServer()
{
  sql_connect();
  $ret   = array();
  $ret[] = sql_fetch_rows("select `id` from test_world limit 0,1000");
  return $ret;
}

thanks!

    This topic has been closed for replies.

    7 replies

    Participating Frequently
    August 2, 2010

    NpComplete ,thanks

    I think my code is not complicated, the problem should be out on the fms.

    Participating Frequently
    August 2, 2010

    These days, I used rhel5.2 test it, get the same results,Memory will always grow fast.

    Adobe Employee
    August 2, 2010

    It would help, if you can provide the valgrind report for the issues.. Valgrind is runtime memory analysis tool. You will have to start the FMSMaster.exe in the console mode through the valgrind. You need to run the valgrind tool memcheck and use ./fmsmaster.exe -console for fms to run. You can consider filing a bug with reports.. It would really help to solve the issue..

    Participating Frequently
    July 20, 2010

    ....i will try it

    Participating Frequently
    July 19, 2010

    July 20, 2010

    Hi,

    Sorry for the late reply.

    If you go through the FMS documentation regd. system requirements (http://www.adobe.com/products/flashmediainteractive/systemreqs/) you can see that Cent-OS is not a supported platform for FMS 3.5. I don't say that it will not work but just that it is not a platform supported by FMS 3.5.3. For linux we support RHEL 4 or RHEL 5.2. If you have such a machine available I would suggest that you try the same on them. In case you still see memory leaks then we can investigate this.

    Thanks,

    Abhishek

    Participating Frequently
    July 17, 2010

    Hi Abhishek,
    I check it several times, the memory increase is fmscore.

      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  TTY      P SWAP   TIME CODE DATA COMMAND
      624 root      25   0 2064m 1.9g 5832 S  0.3 23.4  66:29.04 ?        0 169m  66:29 6428 2.0g fmscore

    Other process are normally

    Thank you for your passion to help!

    by the way, the system is

    Kernel Version2.6.18-194.3.1.el5PAE (SMP)
    Distro Name CentOS release 5.5 (Final)

    Participating Frequently
    July 16, 2010

    Hi!Abhishek,
    in windows sytem ,At first, used about 100M, up to 200M or so. Will be released approximately once every 5 minutes. 1 hour run, stability in the 140M or so.
    in centos,It has been up, running 1 hour to reach 400M, running about 4 hours to 1G.

    This code specifically to test this issue,I did not do anything after getting the rows.

    sResult.onResult = function(date)
    {
    return;
    }

    Thanks.

    July 16, 2010

    Hi sim&fatality,

    I was just thinking that maybe frequent database calls were not closing handler properly leading to amass of large amount of memory, but in that case stats on Linux and Windows should have been similar, but in your case they are significantly different.

    Can you also see which process is consuming a very high memory? Is it the fmscore or some other process? Is the disk I/O very high or something?

    Also check the fms logs for any unexpected message like system memory load is high, etc.

    I will try similar stuff on my end to see if I see similar issue.

    Thanks,

    Abhishek

    July 16, 2010

    Hi,

    I am not clear of the reason of it yet, but I would like to know when you say how you derived the conclusion that windows it works fine but on Linux it leads to memory leaks. Can you just provide some statistics regarding this, I mean stats like at start memory is how much...on windows and linux...then after one hour its how much.

    Looking at your code, it seems you connect to mysql fetch the rows every 1 second, is there any special purpose of that, I mean after getting the rows are you doing any operations on them?

    Thanks,

    Abhishek