Yeah, I only installed SeeFusion so I could get some idea of what was going on 
with the jvm.  The problem existed before I installed SeeFusion.

Andrew

-----Original Message-----
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve 
Onnis
Sent: Friday, 10 August 2007 1:04 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Memory leak??


Have you tried this without seefusion running or even installed?  From memory 
the server monitoring add a lot of overhead to the system

Steve 

-----Original Message-----
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew 
Bateman
Sent: Friday, 10 August 2007 12:18 PM
To: cfaussie
Subject: [cfaussie] Memory leak??


Have just installed CFMX 7.0.2 on a dedicated server and have put it through 
its paces with some load testing. This identified what appears to be a 
significant memory leak.

To test this, I created a simple page that creates an instance of a cfc 
"Test.cfc". I then call a method in Test.cfc which creates 1000 further 
instances of Test.cfc and adds them to a "var" scoped variable within the 
function. Further, I run a loop which executes this 10, times, meaning that 
10,000 instances of "Test" are created for each request (see listing below).
To really spice things up, I execute this page 20 times in a row, thus creating 
1000 * 10 * 20 = 200000 instances of Test.cfc. See listing below.

What I expected to see is RAM usage spiking then dropping off after each page 
request, as garbage collection occurs. I am running SeeFusion, which reports on 
jvm memory usage by ColdFusion and this tells me that this is behaving as 
expected [i.e. memory is allocated/ deallocated from the heap].
However, the Task Manager tells me a different story. Basically the RAM 
assigned to Jrun.exe keeps growing in a linear fashion, until the server runs 
out of RAM and grinds to a halt.

Has anyone else experienced a similar issue and if so do you know of a 
resolution? it seems a similar problem to that documented by Mike Schierbel 
(http://www.schierberl.com/cfblog/index.cfm/2006/10/12/
ColdFusion_memoryLeak_profiler) , but none of the resolutions he proposed have 
had any effect on my server.

FYI, running CF Mx 7.0.2 Standard Edition on a single CPU dual core Xeon with 
2GB of RAM. I have also applied the cumulative Hot Fixes for
7.0.2 .


******************************
LISTING
******************************
--------------------------
Application.cfm
--------------------------
<cfapplication name="LoadTesting" sessionmanagement="true">


--------------------------
LoadTest.cfm
--------------------------
<cfparam name="variables.test"
default="#createObject('component','test').init()#" /> <cfset foo = StructNew()>

<cfparam name="session.counter" default="1">

<cfscript>
        for (i=1; i LTE 10;i=i+1){
                foo[CreateUuid()] = variables.test.LoadTest();
        }
</cfscript>
<!--- this should help, but doesn't ---> <cfset StructClear(variables)> 
<cfoutput>done #session.counter# iterations</cfoutput> <cfif session.counter 
LTE 20>
        <cfset session.counter = session.counter + 1>
        <cflocation url="LoadTest.cfm">
<cfelse>
        <cfset session.counter = 1>
</cfif>

--------------------------
Test.cfc
--------------------------
<cfcomponent output="false">
        <cffunction name="init">
                <cfreturn this/>
        </cffunction>

        <cffunction name="LoadTest" returntype="array">
                <cfscript >
                        var ret = ArrayNew(1);
                        var i=1;
                        for(i=1;i LTE 1000;i=i+1 ){
        
ArrayAppend(ret,CreateObject("component","Test").init());
                        }
                        return ret;
                </cfscript>
        </cffunction>
</cfcomponent>








--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to