Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
will this be solved by increasing the ???
Copy link to clipboard
Copied
I have found that modifying the heap size can be tricky... and frustrating. Use the following code to see where your stats are right now, and refresh this page periodically while your CFFILE routine is running:
<cfoutput>
<cfset runtime = CreateObject("java", "java.lang.Runtime").getRuntime()>
<cfset freeMemory = runtime.freeMemory() / 1024 / 1024> <cfset totalMemory = runtime.totalMemory() / 1024 / 1024> <cfset maxMemory = runtime.maxMemory() / 1024 / 1024>
Max Memory Available to JVM: #Round(maxMemory)#MB<br> Total Memory Allocated: #Round(totalMemory)#MB<br> Free Allocated Memory: #Round(freeMemory)#MB
<br><br>
</cfoutput>
Run this page (above) and note the stats. Then, while the CFFILE process is running, refresh the stats page periodically and note what is happening to your memory. Then, once the CFFILE page either crashes or completed, run the stats page a final time and note the results.
Post back with what you find.
Copy link to clipboard
Copied
You may want to try using some Java objects to write this large file out, they can be more efficient and less memory hungry then the CFML versions.
Here is a good looking link that describes this in more detail I got with a Google Search for ColdFusion Java file object
http://www.bennadel.com/blog/305-ColdFusion-CFFile-vs-Java-java-io-BufferedOutputStream.htm