Lucee 5.2.x Java Heap Issues

With the release of 5.2.x there have been several reports of memory issues. In a bid to track down the problem I’ve merged reports into this single thread. If you have additional information please post here.

This issue is also being tracked in JIRA as:

We are running Lucee with Coldbox and are having a problem with Heap memory filling up. It appears that threads are being created and not removed. I watch them run on VisualVM and they start in a running state. When the request is complete the thread goes into a Park State and stays there. I have a heap dump and a thread dump right after running box and starting the server and then with Postman I issue a Login endpoint and issue a view Customer endpoint 10 times in a row.

It appears to create 1 thread for each request and that thread shows running and then Parked. It will stay in the Parked state for ever. All of these threads consume 383MB which then never is released.

If i run more the heap will run out of room and Java will lock up.

I have started this investigation on Version, tried it on and now on

I am running this is a dev environment on my Windows Laptop Running Win7 and an i7 with 16GB of RAM.

I have the 4 dump files, but as a new user I cannot upload them. the two heap dumps are 112MB each and the two thread dumps are 53 KB each. How can I send them to you?

@djprice Are you sure those are full heap dumps? If your JVM heap is 4GBs for example, I would expect the dump to be 4GBs. You can zip them, but they don’t compress that much. You can stick them on Google drive for now and just post the link here.

I actually decreased my heap size to 1024 for testing

I wouldn’t post any heap dump publicly.

If you have usernames/passwords/any-sensitive-information in memory then it will be available to … the public.

We’ve experienced memory leakage issues with both 4.5 and Upgrading to the latest 5.2.5 snapshot build seems to have solved the problems in both cases. See these two discussions for more detail:

1 Like

@Julian_Halliwell Did you try I’m still running SNAP and it is working great on my cfthread heavy machines.

We loaded on our Development server and my script appear to be running cleaner and faster. The Heap is not climbing like it was on my person laptop.
I believe that the initial problem was my person environment as well as an older version of Lucee.

Can I close this issue or does someone from the team do this? If so, please close this issue.

No we went straight for It was hard to know which version contained the fix we needed so we just went for the latest to make sure we got it. Seems quite stable.

do we have a heap dump to look into?

@micstriit The OP sent a message with the heap dumps shared in Google drive and said he would delete the links after they had been downloaded. It looks like you’re late to the party :slight_smile: Foreseeing this possible outcome, I downloaded them the other day while the links were published and will send them to you now on Slack.

Yesterday I downgraded our production servers from Lucee to Production environment was stable for months on After upgrading to we had three outages in one week all related to memory problems. So I definitly things there is something wrong in this release…

You might want to try which is currently the RC. We were having serious memory issues with earlier versions but this one has been very stable for a couple of months now.


I would have to agree that there is an issue with - after upgrading, servers that ran stable for months are now consuming the heap and throwing GC errors.

Hoping 5.2.5 will resolve the issue when it’s released.

Any idea when 5.2.5 will be released. Since upgrading to I’ve needed to add a scheduled task to restart Lucee every 72 hours to clear the Java Heap otherwise I run into GC errors and it crashes.

Or would I be better rolling back to


We found to be unstable and were also having memory issues with 4.5. In the circumstances we thought it was worth giving 5.2.5 a try despite being just a SNAPSHOT at the time.

It’s turned out to be rock-solid over the last 2-3 months. No more memory/thread problems.

Your situation may prove to be different, but you might want to consider going straight to 5.2.5 even though it’s still a RC.

Thank Julian… others have made similar statements.

I had actually skipped and went to the current from

Something to consider.


I should just add we did a clean install of 5.2.5 having removed our previous 4.5 installation. ran stable for 3 days with only moderate heap elevation. Decided to go to the Resulted in requiring two server restarts in 48 hours. Issue didn’t appear to be heap, but excessive CPU. The heap showed it had climbed to 83%, but the actual server memory usage was less than 2gb but the CPU running at 90%.

Nothing in the error logs regarding heap issues, only a couple of errors referencing a failed feed connection (twitter).

Any ideas? At this point I think I’m going back to (the last stable version I was running).