Googlers, if you have a bunch of heaps with the root coldfusion.runtime.CFDummyComponent to read.
Update 02/22/2011
Mark Asher from MXUnit's fame found the same error in a different context . Its solution includes a large loop over the query, solved by moving from query="name" to from="1" to="#name.recordcount#" index="row" . Another approach that works is to use <cfthread> inside the loop as such:
<cfloop ...> <cfset threadName = "thread" & createUuid()> <cfthread name="#threadName#"> <!--- do stuff ---> </cfthread> <cfthread action="join" name="#threadName#"> </cfloop>
This is very effective when you are faced with situations where you need to do something inside the loop, like queries, and <cfmodule> inside <cffunction> so that the memory consumed is only for this iteration.
Old question
Hope someone else can confirm or tell me what I'm doing wrong. I can play OOM sequentially by invoking the oom.cfm file (shown below). Using jconsole, I can see that the request consumes memory and never releases it until completion. It seems that the problem causes a call to <cfmodule> inside <cffunction> , where if I comment on <cfmodule> , all things are garbage collected during the execution of the request.
ColdFusion Version : 9,0,1,274733
JVM Arguments
java.home=C:/Program Files/Java/jdk1.6.0_18 java.args=-server -Xms768m -Xmx768m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=512m -XX:+UseParallelGC -Xbatch -Dcoldfusion.rootDir={application.home}/ -Djava.security.policy={application.home}/servers/41ep8/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/coldfusion.policy -Djava.security.auth.policy={application.home}/servers/41ep8/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/neo_jaas.policy -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=56033
Test case
oom.cfm (this calls template.cfm below - Adobe Bug # 85736 )
<cffunction name="fun" output="false" access="public" returntype="any" hint=""> <cfset var local = structNew()/> <!--- comment out cfmodule and no OOM ---> <cfmodule template="template.cfm"> </cffunction> <cfset size = 1000 * 200> <cfloop from="1" to="#size#" index="idx"> <cfset fun()> <cfif NOT idx mod 1000> <cflog file="se-err" text="#idx# of #size#"> </cfif> </cfloop>
template.cfm
<!--- I am empty! --->
Update # 2 ( cfthread case by Elliott Sprehn - Adobe ColdFusion Error # 83359 )
<cfthread name="test"> <cfloop from="1" to="10000" index="i"> <cflog text="This is very bad."> <cflock name="test" timeout="10"> </cflock> </cfloop> <!--- Sleep a very long time (10 minutes) ---> <cfset sleep(600000)> </cfthread>
coldfusion memory-leaks coldfusion-9
orangepips
source share