After many searches, I found that the best “fix” for these specific problems was to remove the code that tried to garbage collect and increase the size of the java heap. In the file /jrun/bin/jvm.config.
Changing Arguments in VM to:
java.args=-server -Xms2048m -Xmx2048m -Xmn1024m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -Xbatch -Dcoldfusion.rootDir={application.home}/ -Djava.security.policy={application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/lib/coldfusion.policy -Djava.security.auth.policy={application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/lib/neo_jaas.policy
I managed to increase the initial heap size (Xms) and the maximum heap size (Xmx) to 2048 m, and the heap size of the “young generation” (Xmn) to 1024 m. I was suggested that the young generation should be smaller than the initial and maximum for better collection garbage.
As suggested by James , I commented on the actual processes (which are in the function and var'd), and then uncommented them in turn each time. What I learned from this was that the big SOAP responses were what filled the memory, and not flow, as I was afraid.
As Adam mentioned, it was not about Java running the GC, but that there wasn’t enough room for the management I was throwing at (for some reason CF doesn't like to deal with 2500 records of SOAP responses very well) go figure .
Adam was also right in saying that the problem with deleting Java memory in CF is "dark art." Using the server monitor http://localhost/CFIDE/administrator/monitor/launch-monitor.cfm and switching to the statistics tab in the section "Memory usage" → "Memory usage" I could observe how the memory slowly fills up and is reset itself, even when after a new reboot, there are no processes where it is running. I could never understand why, but I could see which levels work and what I got to the top.
The default memory allocated in the jvm.config file was 512 m, and was simply not enough to handle what was happening. There may be a better way to handle this general process. You may have to implement Henry's suggestion and put it in the database and skip it, although that sounds very awkward for me.
I’m sure that others, then CF now grabs a huge chunk of resources right out of the gate, there may be other problems with this solution, but (at the moment) it works as needed.
UPDATE: I changed the cfc function so that instead of inserting everything into the database, I would write all the XML files and then read the file and paste it into the database. Somehow, writing to the file allowed java to "breathe" long enough to execute GC ().