Migration Performance Issue - memory leak

We are migrating an application from Adobe CF to Lucee, and the application is of heavy traffic one. As part of the functional / load test its observed that the heap memory is growing up gradually and server not responds after 2-3hrs and need a service restart. Gone through various articles and couldn’t find the exact cause of the issue. Any thoughts on this will be greatly appreciated.

OS: Windows server 2019
Java Version: 1.8.0_301 (Oracle Corporation) 64bit
Tomcat Version: Apache Tomcat/9.0.62
Lucee Version: Lucee

JVM options


Server Admin settings

session type: Application
session timeout: 30

without any other details, I’m guessing that coz lucee passes by reference, that could be the culprit?

you can also try doing a heap dump to see what’s in the heap, or try fusion reactor

Is it something memory leak?

looks like it, can you dig into it and see what’s in there?

1 Like

I think almost reached it.

We were using isSafeHTML in ColdFusion for the input validation. That got replaced with AntiSamy in our Lucee project. And heap dump shows it is causing a lot. When removed the validation, its running pretty well.

Any other recommendation for isSafeHTML

1 Like

you can try sanitizehtml() :: Lucee Documentation (needs the latest ESAPI ext)

how are you loading the antiSamy jars? they only need to be loaded once, loaded jars don’t get GCed, which is probably causing the problem


In each request the input needs validation and was loading every request. Yes, moving them to application scope as needed to load only once.

Thanks a lot for the inputs.


my pleasure, glad I could help!

1 Like

@Zackster, Moved them to application scope. Issue got resolved and its amazing performance. Really appreciate your help.

1 Like