We’re got Lucee 5.3.6, on Tomcat 9 and Open JDK 11 all working on Linux.
Sometimes we get a request timeout - the front end web server (Nginx) logs a 500, and our Application.cfc’s onError() is called.
This does two things - logs the message too application.log and sends an email with the full details.
Recently, we’re seeing 500s in the access log, and an entry in application.log, but no email is sent.
I was able to catch it in the act today and exception.log contains a stack like this :
request /api/index.cfm (/......../api/index.cfm) has run into a timeout (timeout: 50 seconds) and has been stopped. The thread did start 50240ms ago.
at java.base/java.lang.Thread.getStackTrace(Thread.java:1606)
at lucee.runtime.CFMLFactoryImpl.createRequestTimeoutException(CFMLFactoryImpl.java:610)
at lucee.runtime.util.PageContextUtil.checkRequestTimeout(PageContextUtil.java:210)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:835)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:818)
at application_cfc$cf.udfCall1(/Application.cfc:344)
...
That line in Application.cfc is where it does include error.cfm
function onError(required any Exception, required string EventName) {
writelog(text='Error : #arguments.exception.message#',type="error");
include 'website/error.cfm';
We used to get these emails e.g. onError’s run time continued after a request timeout and sent an email. That was on a very similar stack but Lucee 5.2.9
Could something have changed ? How can I be sure to log all the details of a timeout error ? Are there some things you shouldn’t do in onError ?