[cfaussie] Re: Memory leak??

2007-08-12 Thread Matthew

Hi Andrew,

Did you get an answer to your problem? I can't believe that no one out
there has an answer! Recently we had a similar problem with JRun using
up more and more memory until it would crashed. We played around with
all sorts of things to try to get it fixed. In the end we think it was
as simple as lowering out simultaneous requests from 20 down to 10.
Perhaps try that.

Please post your resolution if you find one.

Cheers
Matthew

On Aug 12, 9:33 am, Andrew Bateman [EMAIL PROTECTED]
wrote:
 Yeah thanks Taco. I have load testing tools available but I was using this 
 approach to prove a point, ie that ColdFusion was not releasing memory. Not 
 so much load testing as death testing.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[cfaussie] Re: Memory leak??

2007-08-12 Thread Pat Branley

I think its more a problem with your code - what kind of request
creates 10,000 cfc instances ?

if you see that kind of performance issue in proudction you would have
2 options.
1. refactor the code
2. get better hardware

in this instance (way too many instances junking up memory) id go for
the refactor option, by using caching and pooling to reduce the no. of
instances per request. If i saw too many requests hitting the site id
proly go down the hardware option. If lots of ppl are hitting my site,
hopefully im making money and can afford the hardware upgrade! :)

obviously theres a point that jrun / jvm / java will just grind down
if you create too many of anything in memory. So my response would be
your code isnt a fair test..

also this line of your code looks to be creating a non-scoped object:

ArrayAppend(ret,CreateObject(component,Test).init());

it could be an issue of the garbage collection not working 100% as
expected because of the lack of scope.

I have seen these jrun memory issues in the past and sometimes it will
use heaps of ram to the point the server will fail. However, it doesnt
happen that often in production and when it does its more gradual...

Pat




On Aug 13, 10:04 am, Matthew [EMAIL PROTECTED] wrote:
 Hi Andrew,

 Did you get an answer to your problem? I can't believe that no one out
 there has an answer! Recently we had a similar problem with JRun using
 up more and more memory until it would crashed. We played around with
 all sorts of things to try to get it fixed. In the end we think it was
 as simple as lowering out simultaneous requests from 20 down to 10.
 Perhaps try that.

 Please post your resolution if you find one.

 Cheers
 Matthew

 On Aug 12, 9:33 am, Andrew Bateman [EMAIL PROTECTED]
 wrote:

  Yeah thanks Taco. I have load testing tools available but I was using this 
  approach to prove a point, ie that ColdFusion was not releasing memory. Not 
  so much load testing as death testing.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[cfaussie] Re: Memory leak??

2007-08-11 Thread Taco Fleur
Hi Andrew,

Thats not really load testing though is it?
There is no pause anywhere, its nothing like any real requests that would be
made this way. You're better of running some load testing tools, there's
plenty of them out there, even free ones.

-- 
*** http://www.clickfind.com.au
The new Australian search engine for businesses, products and services
*** http://brisbane-web-design.pacificfox.com.au blog
*** Virtual and Dedicated Servers with MS SQL from $250 a month
*** Virtual and Dedicated Servers with registered version of ColdFusion from
$350 a month
*** ColdFusion licenses at the lowest price

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[cfaussie] Re: Memory leak??

2007-08-11 Thread Andrew Bateman
Yeah thanks Taco. I have load testing tools available but I was using this 
approach to prove a point, ie that ColdFusion was not releasing memory. Not so 
much load testing as death testing.
 
 
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[cfaussie] Re: Memory leak??

2007-08-09 Thread Andrew Bateman

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 = 20 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) 
cfoutputdone #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
-~--~~~~--~~--~--~---