Heap memory gradually increases after complex use of ArrayEach() with parallel threads


A complex recurring task involving multiple and nested usage of ArrayEach(), which works fine in Lucee 5.3.4.x, causes the heap to gradually increase until there is no memory left.

Further details are set out in this discussion on the Forum, which points to a possible issue or regression related to recent optimizations of how PageContext objects are handled/cached with ArrayEach.


Windows 2019. OpenJDK 11.0.9, Tomcat 9.0.31.


Michael Offner
January 9, 2021, 5:42 AM

test version is as reported in that ticket to the right

I only report what i see in the dump and did my best based on that data, i don’t say that this fixes the problem, but i hope it

Michael Offner
January 9, 2021, 5:45 AM

build is not yet there because Travis (our build project) has limited CPU for projects for non paying projects like us, you can see progress of the build here


Julian Halliwell
January 9, 2021, 8:30 PM

Thank you . I've applied the patch version to the server, but as the condition only arises during business hours I won't have any results until Monday. Will report back then.

Julian Halliwell
January 11, 2021, 10:19 PM

I'm happy to report that your fix seems to have worked. Not only is memory use stable again with normal GC activity, but overall heap usage seems to be lower too. Thank you!

Zac Spitzer
January 12, 2021, 5:06 AM

I think we should consider backporting this important fix to 5.3.7?

given that the stable 5.3.8 is a while off



Michael Offner


Julian Halliwell



Fix versions


5.3.8 Sprint 3

Affects versions