The request has exceeded the allowable time limit Tag: CFLOOP

2,501 views
Skip to first unread message

Gavin Beau Baumanis

unread,
Feb 1, 2011, 10:34:57 PM2/1/11
to cfau...@googlegroups.com
Hi there everyone,

We have an issue with some long running SQL in our application.

The error is;
The request has exceeded the allowable time limit Tag: CFLOOP

The docs don't seem to indicate that the CFLOOP tag even has a timeout attribute.


The stack trace (below) seems to indicate that the request is timing out - but the timeout set in the CFAdmin is 1000 seconds (16.66 minutes)
and the error is being thrown before then.


coldfusion.runtime.RequestTimedOutException: The request has exceeded the allowable time limit Tag: CFLOOP at coldfusion.runtime.CfJspPage.checkRequestTimeout(CfJspPage.java:2907) at cfweeklypatientvisits_bereaved2ecfm309418466._factor43(/var/www-vhosts/palcare/teomanga/patient/weeklypatientvisits_bereaved.cfm:531) at cfweeklypatientvisits_bereaved2ecfm309418466._factor64(/var/www-vhosts/palcare/teomanga/patient/weeklypatientvisits_bereaved.cfm:387) at cfweeklypatientvisits_bereaved2ecfm309418466._factor66(/var/www-vhosts/palcare/teomanga/patient/weeklypatientvisits_bereaved.cfm:386) at cfweeklypatientvisits_bereaved2ecfm309418466._factor67(/var/www-vhosts/palcare/teomanga/patient/weeklypatientvisits_bereaved.cfm:78) at cfweeklypatientvisits_bereaved2ecfm309418466._factor68(/var/www-vhosts/palcare/teomanga/patient/weeklypatientvisits_bereaved.cfm:3) at cfweeklypatientvisits_bereaved2ecfm309418466.runPage(/var/www-vhosts/palcare/teomanga/patient/weeklypatientvisits_bereaved.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:381) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:94) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) 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:200) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)


I thought perhaps it might have been a query timeout.
But we don't use the timeout attribute in any of our SQL.
And we use PostgreSQL - and that DSN settings do not have a query timeout setting in CFAdmin for the PostgreSQL driver / datasource.

We are bit stuck with this - So I thought I had better ask for some help.


Gavin.

Mark Mandel

unread,
Feb 1, 2011, 10:37:24 PM2/1/11
to cfau...@googlegroups.com
You page is exceeding the request time-out.

The error is misleading, just because the Tag displayed just happens to be wherever the code lands when the timeout occurs.

You may want to increase the request timeout on that page, or drop some <cftimers> in place, and work out what is taking so long, and attempt to speed it up (or both!)

Mark


--
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfau...@googlegroups.com.
To unsubscribe from this group, send email to cfaussie+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.




--
E: mark....@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

cf.Objective(ANZ) - Nov 17, 18 - Melbourne Australia
http://www.cfobjective.com.au

Hands-on ColdFusion ORM Training
www.ColdFusionOrmTraining.com

Gavin Beau Baumanis

unread,
Feb 1, 2011, 10:56:29 PM2/1/11
to cfau...@googlegroups.com
Hi Mark,

Thanks for the reply - as always I appreciate the help.

I just timed it and the error is being thrown at 8 (and a bit) minutes.
It is well within the 16 minutes request timeout setting of the CFAdmin.

So I don't see how that can be the case - and thus the looking for answers, elsewhere.


Gavin.

MrBuzzy

unread,
Feb 1, 2011, 11:02:41 PM2/1/11
to cfau...@googlegroups.com, cfau...@googlegroups.com
My money is on a web service invocation taking a long time, or a bit fat query :) 

Mark Mandel

unread,
Feb 1, 2011, 11:03:57 PM2/1/11
to cfau...@googlegroups.com
Do you have a request setting somewhere else? as a <cfsetting> that may be lower?

Is your request timeout 960 seconds? (Rather than 480) - stupid question, but figured I would ask.

Mark

Carl

unread,
Feb 1, 2011, 11:15:18 PM2/1/11
to cfaussie
Hi Gavin,

Just thinking on this another way. Perhaps the CFLOOP timeout error
is “a knee jerk reaction” and you need to have a look more overall
Are CF related things running slow or poorly in general? Are the error
details also in CF\runtime\log\coldfusion-out.log (Jrun4\logs in case
of multiserver)? Other interesting details in coldfusion-out.log?

HTH, Carl.


> Thanks for the reply - as always I appreciate the help.
>
> I just timed it and the error is being thrown at 8 (and a bit) minutes.
> It is well within the 16 minutes request timeout setting of the CFAdmin.
>
> So I don't see how that can be the case - and thus the looking for answers, elsewhere.
>
> Gavin.
-

Gavin Beau Baumanis

unread,
Feb 1, 2011, 11:39:39 PM2/1/11
to cfau...@googlegroups.com
Hi again Mark,

The request timeout in CFAdmin is set to 1000.
We do not use CFSETTING anywhere - so the only timeout setting we have anywhere is in the CFAdmin interface


Gavin


Steve Onnis

unread,
Feb 1, 2011, 11:44:14 PM2/1/11
to cfau...@googlegroups.com

Maybe there is the “Stop Long Running Scripts” setting that is killing it before it finishes?

 

Gavin

 

 

 

 

--

You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfau...@googlegroups.com.
To unsubscribe from this group, send email to cfaussie+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.





=======
Email scanned by PC Tools - No viruses or spyware found.
(Email Guard: 7.0.0.21, Virus/Spyware Database: 6.16820)
http://www.pctools.com
=======






=======
Email scanned by PC Tools - No viruses or spyware found.
(Email Guard: 7.0.0.21, Virus/Spyware Database: 6.16820)
http://www.pctools.com
=======

Gavin Beau Baumanis

unread,
Feb 2, 2011, 12:00:20 AM2/2/11
to cfau...@googlegroups.com
Hi Steve, 
I assume that is in IIS  / web server setting - since I can't find it in the CFAdmin interface anywhere?

And if so would I not be getting a HTTP error and not a CFML generated one?

Steve Onnis

unread,
Feb 2, 2011, 1:17:42 AM2/2/11
to cfau...@googlegroups.com

Its under “Server Settings > Settings”.......”Timeout requests after (seconds)”

 

Gavin

 

 

 

coldfusion.runtime.RequestTimedOutException: The request has exceeded the allowable time limit Tag: CFLOOP at coldfusion.runtime.CfJspPage.checkRequestTimeout(CfJspPage.java:2907) at cfweeklypatientvisits_bereaved2ecfm309418466._factor43(/var/www-vhosts/palcare/teomanga/patient/weeklypatientvisits_bereaved.cfm:531) at cfweeklypatientvisits_bereaved2ecfm309418466._factor64(/var/www-vhosts/palcare/teomanga/patient/weeklypatientvisits_bereaved.cfm:387) at cfweeklypatientvisits_bereaved2ecfm309418466._factor66(/var/www-vhosts/palcare/teomanga/patient/weeklypatientvisits_bereaved.cfm:386) at cfweeklypatientvisits_bereaved2ecfm309418466._factor67(/var/www-vhosts/palcare/teomanga/patient/weeklypatientvisits_bereaved..cfm:78) at cfweeklypatientvisits_bereaved2ecfm309418466._factor68(/var/www-vhosts/palcare/teomanga/patient/weeklypatientvisits_bereaved.cfm:3) at cfweeklypatientvisits_bereaved2ecfm309418466.runPage(/var/www-vhosts/palcare/teomanga/patient/weeklypatientvisits_bereaved.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:381) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:94) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) 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:200) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet..jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

To post to this group, send email to cfau...@googlegroups.com..


To unsubscribe from this group, send email to cfaussie+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.




--
E: mark....@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

cf.Objective(ANZ) - Nov 17, 18 - Melbourne Australia
http://www.cfobjective.com.au

Hands-on ColdFusion ORM Training
www.ColdFusionOrmTraining.com

 

--
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfau...@googlegroups.com.
To unsubscribe from this group, send email to cfaussie+u...@googlegroups.com.

For more options, visit this group at http://groups..google.com/group/cfaussie?hl=en.

 

m...@ampersand.net.au

unread,
Feb 2, 2011, 6:09:16 PM2/2/11
to cfau...@googlegroups.com
Hi Guys.

I am doing some research on sending web forms to print and thought some
of you may have already done this.

I have a client (early stages at the moment) who wants to be able to
fill in a web form, upload a few images, and pump out a PDF at the end
of the process. Normally I would create a HTML page from a template then
make a PDF of that page, but I need the eventual PDF to be as press
ready as possible (he wants to be able to send it directly to a printer
to print off 100 copies or whatever).

Has anyone done this in the past, and if so can you recommend any
software etc. I should look into? I can install software on the server
so I am thinking something that I may be able to install and run from
the command line via cfexecute.

Thanks,
Mark


charlie arehart

unread,
Feb 2, 2011, 7:08:58 PM2/2/11
to cfau...@googlegroups.com

Additional to Mark’s observation, as for why it’s seeming to timeout on CFLOOP, CF often shows the timeout occurring on a tag that *follows* that which may have caused the request to run long (often, a cfquery or cfhttp, etc.) So you often can’t use the tag shown to know wwere the timeout occurred. I discuss that more (as well as some other surprising info on CF timeouts) in an entry:

http://www.carehart.org/blog/client/index.cfm/2010/10/15/Lies_damned_lies_and_CF_timeouts


All that said, I hear you saying that the real confusion is that it’s timing out *before* you think it should. Given that it’s happening on the CFLOOP (and not a tag like CFQUERY or CFHTTP, which can have its own TIMEOUT attribute), I would propose that you simply *have to* have something controlling that timeout more broadly, and it’s either the CF Admin “timeout requests” setting or a CFSETTING REQUESTTIMEOUT.

I saw you say later in the thread that you don’t use the latter. Well, you may and not realize it. Of course, it could be set anywhere in the life of the request before this code runs, so it could be an include, or in a CFC called, or in the application.cfm./cfc or files they would call. Note that the application.cfc offers an app-level controllable equivalent as this.timeout (not this.requesttimeout).

Given all that, I’d propose you could at least rule things out by searching your codebase for any reference to requesttimeout (to find any use of CFSETTING) and then search all application.cfcs for this.timeout.

Finally, and assuming you find none (or would swear to it without checking), going back to the Admin timeout setting, I realize you think it’s set larger, but here’s a possibility: you may be looking at an Admin that is NOT the one controlling the code you’re running. For instance, if you have multiple instances, you may be inadvertently seeing the CF Admin for one instance, while your code is running in another (with its own other Admin). I see it more often than you may believe. :-) Again, worth ruling out.

Hope that helps.

/charlie

 

From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On Behalf Of Mark Mandel


Sent: Tuesday, February 01, 2011 10:37 PM
To: cfau...@googlegroups.com

Gavin Beau Baumanis

unread,
Feb 2, 2011, 9:10:04 PM2/2/11
to cfau...@googlegroups.com
HI Charlie,

Thanks for the reply, here and on your blog.

I have performed a search, there is not a single instance of cfsetting tag with respect to timeout.
(In some cases we have showdebugoutput used in the code.)

We only have a single instance of CF on our staging server and the request timeout is most certainly set to 1000 seconds (16 minutes)
The page most certainly timeouts after only 5 minutes.

There are no timeout settings that can be made within the DB server
We do not use the timeout attribute in any cfquery tags.
This particular process does not use ORM / ColdSpring etc. - it is cfml/html only for running a report.

Looks like we will rewrite the report from the ground-up and see how we go.
If it works (the new one) - we can then do a comparison between the two and hopefully nut-out what is wrong with the original.

Thanks to all.


Gavin "Beau" Baumanis


charlie arehart

unread,
Feb 2, 2011, 10:00:41 PM2/2/11
to cfau...@googlegroups.com

Well, there’s one last thing I suggested which you didn’t confirm checking: “then search all application.cfcs for this.timeout”. Worth asking in case you missed it.

Beyond that, I’ll ask again: the timeout on the cfloop suggests that something possibly prior to that was what ran long, and it was the CFLOOP tag that next ran and CF said, “oh goodness, we’ve run long”. It might be interesting if you could be watching the request while it runs doing a stack trace either from the CF Server Monitor or a tool like FusionReactor, to see what it’s “waiting” for prior to that 5 minute timeout.

I realize that’s not solving your real problem, “why is it timing out at 5 minutes”, but you refer to rewriting the report, as if to suggest that somehow that will change things. In that case, it just seems it may be useful for you to know why it is waiting when it’s running long. I haven’t done a blog entry on taking stack traces, but I have done a talk about it, at http://www.carehart.org/presentations/#stack (which offers both notes and a recording).

Hope that helps.

 

/charlie

 

From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On Behalf Of Gavin Beau Baumanis
Sent: Wednesday, February 02, 2011 9:10 PM
To: cfau...@googlegroups.com
Subject: Re: [cfaussie] The request has exceeded the allowable time limit Tag: CFLOOP

 

HI Charlie,

charlie arehart

unread,
Feb 2, 2011, 10:14:10 PM2/2/11
to cfau...@googlegroups.com
Are you on CF 7 or above? If so, then CFDOCUMENT would seem to be what you
want. Or is there something about that you've considered that doesn't seem
to work?

I realize you say, "Normally I would create a HTML page from a template then
make a PDF of that page", but you don't say how you would do that.
CFDocument would seem to fit the bill. Now, you go on to say, "but I need
the eventual PDF to be as press ready as possible". Is there perhaps
something about that requirement that you may feel doesn't suit CFDocument?

Just trying to help you/others here explore your options.

/charlie


> -----Original Message-----
> From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On

m...@ampersand.net.au

unread,
Feb 2, 2011, 11:02:10 PM2/2/11
to cfau...@googlegroups.com
Hi Charlie.

I am in CF8. I think the biggest issue with using cfdocument for this is it just isn't set up to produce documents in CMYK and at 300dpi.

Paul Kukiel

unread,
Feb 2, 2011, 11:40:44 PM2/2/11
to cfau...@googlegroups.com
I had issues with cfdocument a few times with massive pdf's.  What I did was write out the html to a temp url then use

http://code.google.com/p/wkhtmltopdf/

with cfexecute on the web accessible html files, delete the html and deliver the PDF and it frees up the CF application server ( as it's executed as a separate process ).

It works really well and was much faster then cfdocument and has loads of features ( landscape etc ).

Paul.

Vendigo Design

unread,
Feb 2, 2011, 11:57:12 PM2/2/11
to cfau...@googlegroups.com
Hi Mark,

Not sure if this is what you're after but if the PDF you want as the end
result has a fixed layout, then you could use a PDF Form.

You can setup your PDF file (as CMYK and 300dpi) then save as a PDF Form
with editable fields, then have ColdFusion populate the editable fields
with data from your web form.

The <cfpdfform action="populate"> tag can do this, even uploading images
if your PDF form has image fields.

You just need to save the uploaded image on the server, then use:

<cffile action="readbinary" file="#imageFilename#" variable="imageData">
<cfset imageDataB64 = binaryEncode(imageData,"Base64")>
<cfpdfformparam name="imageFieldName" value="#imageDataB64#">

regards
Ryan

m...@ampersand.net.au

unread,
Feb 3, 2011, 12:21:03 AM2/3/11
to cfau...@googlegroups.com
I did think of using a PDF form but I needed to put some images in it, and I couldn't work that bit out. This is absolutely worth investigating, thanks very much. I knew someone would have worked this out!

At the moment I am having a play with Latex, which is kind of nice but I'll see how the PDF comes out the other end...

Reply all
Reply to author
Forward
0 new messages