Starting with the easy questions, Lucee version is 5.4.6.9 and I am running it in a Azure Web App with the following configuration:
- Stack: Java 11
- Java Web Server: Apache Tomcat 9.0.54
And we only run one instance of the site.
Resource Usage
We’ve recently started digging deeper into some stability issues, after pushing a DB fix to prevent site crashes. I’ve been monitoring CPU and memory usage and, as shown in the screenshots below, the system is under very little stress—averaging around 50% memory usage and low CPU utilization:
To validate the metrics, I ran a basic test by hitting the site a few times per second from my local machine. This briefly maxed out the CPU for about a minute, but the site remained stable. The only noticeable impact was a slight increase in response times, which I suspect was mitigated by the Azure load balancer.
Logging Issues
I have also tried this.logs
in Application.cfc
but this instead of an error it gave me a white screen. I was able to find the below error in the tomcat logs
"ERROR","http-nio-80-exec-2","07/04/2025","16:16:08","controller","java.lang.NullPointerException;java.lang.NullPointerException
at lucee.commons.io.log.log4j2.Log4j2Engine.layoutClassDefintion(Log4j2Engine.java:154)
at lucee.runtime.listener.ApplicationContextSupport.initLog(ApplicationContextSupport.java:335)
at lucee.runtime.listener.ModernApplicationContext.initLog(ModernApplicationContext.java:1761)
at lucee.runtime.listener.ModernApplicationContext.getLog(ModernApplicationContext.java:1735)
at lucee.runtime.PageContextImpl.getLog(PageContextImpl.java:3775)
at lucee.runtime.engine.ThreadLocalPageContext.getLog(ThreadLocalPageContext.java:173)
at lucee.runtime.exp.ExceptionHandler.log(ExceptionHandler.java:37)
at lucee.runtime.PageContextImpl.handlePageException(PageContextImpl.java:2057)
at lucee.runtime.PageContextImpl.handlePageException(PageContextImpl.java:2030)
at lucee.runtime.listener.ModernAppListener.onError(ModernAppListener.java:439)
at lucee.runtime.listener.MixedAppListener.onError(MixedAppListener.java:138)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2522)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2479)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2450)
at lucee.runtime.engine.Request.exe(Request.java:45)
at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1215)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1161)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
Which I didn’t really understand why it was a null pointer exception?!
Tomact Logs
Good shout for checking this, I don’t get an out.log
or err.log
I instead get catalina.hash.year-month-day.log
. I have checked them on a known failure day but it was what looks like normal start up logs. There are two common warnings
18-Jun-2025 02:49:05.411 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [C:\home\tomcat\lib], exists: [false], isDirectory: [false], canRead: [false]
18-Jun-2025 02:49:05.426 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [C:\home\site\libs], exists: [false], isDirectory: [false], canRead: [false]
but as the server starts up I didn’t think it was an issue.