I have been running into memory issues trying to solve this year's Advent of Code programming puzzles in CFML.
It seems to me as if Lucee holds on to all intermediate values used in a function until the function is finished.
Using the latest lucee/lucee52 docker image (184.108.40.206) with "LUCEE_JAVA_OPTS=-Xms256m -Xmx512m -Xloggc:/opt/lucee/web/logs/GC.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps":
And then nothing more. I see in GC.log that the JVM performs 1-2 full GCs every second and that it manages to free very little memory.
I have also tested to upgrade to 220.127.116.11-SNAPSHOT inside the container but that made no difference.
On Adobe ColdFusion 2016.0.0.298074 the script completes without issues and the time between every percentage of completion is fairly constant all the time.
The request should complete without issues. At any point in time the function is referencing very little data so the JVM should be able to GC the intermediate values.
Split up the work:
Hi and ,
Thank you for looking into this issue.
Your interpretation of what I meant is correct. That was my (incorrect) guess of what was happening based on the behavior I was seeing.
I can confirm that your suggestion helps both with the test case and with my Advent of Code-solutions.
I hope above workaround is helps you. Can I close this ticket?
Sure, that's fine by me. Thanks!
this commit broke my app, output inside a function with output="true" with a cfabort was returning nothing
the task status is rejected, but the following change wasn't reverted?
private boolean bufferOutput=false; wasn't reverted back to private boolean bufferOutput=true;
i just wasted a couple of hours tracking this down, enabling "Settings/Output/Buffer Tag Body Output" got things working again
I run a quick test with following code,
It output returns as "Susi" as expected, even though I've unchecked the "Settings/Output/Buffer Tag Body Output" in admin.
I've tested with Lucee 18.104.22.168 snapshot.
I missed anything here? Or Can you please post the code here?