Details
Assignee
Michael OffnerMichael OffnerReporter
Philip EybPhilip Eyb(Deactivated)Priority
MajorNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Philip Eyb
Philip Eyb(Deactivated)Priority
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 4 February 2016 at 13:17
Updated 19 May 2021 at 11:40
The problem only occurs if a custom error - template is executed because of a request timeout and a < cfquery > tag without timeout attribute is executed within the custom error - template.
With the solution of LDEV-479, the timeout attribute for the tag is automatically set to the remaining request time if not specified by the tag itself . In the case of a request timeout, the internal check resolves to true, and a new "RequestTimeoutException" is thrown. As we already reached RequestTimeOut, this generated error cannot be caught with a try / catch.
Query.java , Line 467-469 ; LDEV-479
+ this.timeout=PageContextUtil.remainingTime(pageContext); + if(this.timeout.getSeconds()<=0) + throw new RequestTimeoutException("request timeout occured!");
There are two possible workarounds:
a) in the custom error - template, at the beginning, do something like this:
<cfsetting requestTimeout = " #getPageContext().getRequestTimeout()*2# " / >
b) add "timeout" attribute to the query tag:
<cfquery name="foo" timeout="20" ... >
The documentation of <cfquery> does not document and explain the scope and consequences of the change and even more worse: an existing application now can show the well known "last exit" error screen (in case of a request timeout), depending on the admin setting "Settings –> Error -> Status code". And this error screen is confusing, as it does not show the real source of the problem.
This also applies to <cfhttp>.