coldfusioncfdocument

the request has exceeded the allowable time limit tag: cfoutput


I have a large report. The SQL only takes about 60 seconds to run but the actual rendering of the PDF is what takes up all the time. It has hundreds of pages.

The global setting for request timeouts is set to 240 seconds.

I am overriding the Global setting for this report and setting the value arbitrarily high (3600 seconds). realistically this report can't take more than 15 min to complete.

Regardless of how high I set the timeout this page will generate the time limit error well before it hits my timeout.

The SQL can take anywhere from 24 seconds to 4 min to complete depending on how many areas are selected.

Even though I am overriding the timeout, the page generates the error about 170 seconds (only one data point for that) after completing the queries. So this is happening sometimes even a full minute before the global timeout is hit.

Is there a limit to how much time a cfdocument can take to render a PDF?

Is there a way to increase that timeout?

Could this be related to something else like the maximum output buffer size?

here is a custom function I'm using to test what the requesttimeout is:

<cffunction name="getCurrentRequestTimeout" output="false" access="private" returntype="numeric">
    <cfset var rcMonitor = createObject("java", "coldfusion.runtime.RequestMonitor") />
    <cfreturn rcMonitor.getRequestTimeout() />
</cffunction> 

I placed that in a couple spots to determine if the timeout was being set properly. In all cases it returned 3600 seconds.

Edit, here's another clue:

This report cross references data from 8 other queries (which have already been run in the controller) it does the cross referencing in the view. About a year ago we sped this up considerably (taking the run time from 1 hour down to 10 min) by creating hashes for the queries we were cross referencing. A task came through to completely remove 4 of the queries we were hashing from the report. Once I pulled those BuildHashTable function calls out of the view and removed all references to those queries the page no longer crashes after 3 min, it now takes 7.5 min to fail.

coldfusion.runtime.RequestTimedOutException: The request has exceeded the allowable time limit Tag: cfoutput
at coldfusion.tagext.io.OutputTag.doStartTag(OutputTag.java:72)
at cfdump2ecfm625244097._factor54(/WEB-INF/cftags/dump.cfm:118)
at cfdump2ecfm625244097.runPage(/WEB-INF/cftags/dump.cfm:1)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:246)
at coldfusion.filter.CFVariablesScopeFilter.invoke(CFVariablesScopeFilter.java:56)
at coldfusion.tagext.lang.ModuleTag.doStartTag(ModuleTag.java:332)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2991)
at cfonerror2ecfm289163184.runPage(D:\CF11\facilopstest\wwwroot\HFDS\events\onerror.cfm:8)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:246)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:736)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2991)
at cfcfml2ecfm2118004321$func$INCLUDEANDRETURNOUTPUT.runFunction(D:\CF11\facilopstest\wwwroot\HFDS\wheels\global\cfml.cfm:138)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2810)
at cfonerror2ecfm1534078820$func$RUNONERROR.runFunction(D:\CF11\facilopstest\wwwroot\HFDS\wheels\events\onerror.cfm:65)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2810)
at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:493)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2992)
at cfcfml2ecfm2118004321$func$SIMPLELOCK.runFunction(D:\CF11\facilopstest\wwwroot\HFDS\wheels\global\cfml.cfm:44)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2810)
at cfonerror2ecfm1534078820$funcONERROR.runFunction(D:\CF11\facilopstest\wwwroot\HFDS\wheels\events\onerror.cfm:14)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:643)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:432)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:402)
at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:108)
at coldfusion.runtime.AppEventInvoker.onError(AppEventInvoker.java:491)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:532)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:142)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:78)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:219)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:437)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:197)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

Windows server 2008 running ColdFusion 11,0,07,296330 Enterprise


Solution

  • I solved it. the problem was a cartesian product which may have been blowing up the memory. It caused some loops in the output to run for much much longer than intended. I'm assuming this inflated the size to such a degree that it would crash. Still no idea why it would trigger a timeout way ahead of time but at least it's fixed.