Hi!! This week I realized that my app can no use threads, when I do that all the memory allocated to jetty is completely eaten... I need to run near 1000000 jobs (1 million) that runs a multithreaded function... the whole process takes like 10 hours, with threads, without would be 50 hours more or less. Its crucial to make it within a day. I thought that maybe somehow I was creating references that could not be recollected so I tried a much more simple test and I got same results. In my machine takes 3 min to eat all the 4GB allocated. The cpu is fine, under 20%. Following several useful posts I tried to manually set ouput="false" in the cfc or functions but it didn't solve the leak. http://blog.maestropublishing.com/fixing-a-mysterious-memory-leak-on-coldfusion
Use the cfc below as a rest service at http://myopenbdserver/Test.cfc?method=test Server : Windows 2008 Memory allocated to openbd : 4GB CPU : Intel Core i3 2130 2x2(HT)x3.4+ GHz openbd version : 2.0.2 Nightly Build Test.cfc <cfcomponent> <cffunction name = 'test' access='remote' returnformat='json'> <cfscript> var ii = 0; while(ii < 500000) { for(var i=1; i<=5; i++) { thread action="run" name="thread#ii##i#" myvar=i { console("running thread number #myvar#"); //if you use desktop version ;) you will see it running } } for(var i=1; i<=5; i++) { thread action="join" name="thread#ii##i#"; thread action="terminate" name="thread#ii##i#"; } ii++; } return "done ;)"; </cfscript> </cffunction> </cfcomponent> -- online documentation: http://openbd.org/manual/ http://groups.google.com/group/openbd?hl=en
