2

I have been banging my head against this brick wall for awhile now. I have some beefy scheduled tasks that easily go over our global timeout. Since we upgraded to Coldfusion 2018, it seems like the standard fix of <cfsetting requestTimeout="7200"> doesn't override the global timeout.

I have also added timeouts to every query within the template, as well as the cfhttp call itself. Funny thing, when I remove the cfhttp call from the template, it still times out with the same error The request has exceeded the allowable time limit Tag: cfhttp even though the tag is gone.

When I run the page directly via the URL, the template runs perfectly and never times out.

So, how do I make the schedule task respect the timeouts within the template and ignore the global timeouts?

UPDATE: I remembered we have another server, same CF version, that runs beefy tasks just like the one I am trying to run. However, it doesn't error out, it just warns and lets the task finish.

1968
Oct 12, 2021 09:25:09 AM Warning [ajp-nio-127.0.0.1-8018-exec-2] - Thread: ajp-nio-127.0.0.1-8018-exec-2, processing template: template.cfm, completed in 309 seconds, exceeding the 60 second warning limit

1969
Oct 12, 2021 09:25:09 AM Information [DefaultQuartzScheduler_Worker-8] - HTTP request completed {Status Code=200 ,Time taken=309951 ms}

is there a setting or flag I can set to just have warnings rather than exceptions?

  • It looks like the error is caused from a timeout in a cfhttp call, not the scheduled task itself. Have you looked at all your cfhttp calls? – Redtopia Oct 09 '21 at 06:10
  • 1
    @Redtopia, I have a timeout on the cfhttp call when it throws that error. And even I'd the tag is removed and there are no cfhttp tags on page, I still get that error. Although, I'm guessing that is a caching issue in CF. The page only consists of multiple queries, and one cfhttp call. All of which, have timeouts of 7200. – LoserDoubleZero Oct 09 '21 at 14:54
  • 1
    you got me stumped. I am no longer using ACF since I've been using Lucee for several years now. My guess is that ACF is using cfhttp to run the scheduled task. I would try adding some logging in the task file and make sure you have it wrapped in a try/catch and add logging inside the catch. Then I would try eliminating blocks of code as you iterate over running the task from the admin. – Redtopia Oct 09 '21 at 18:07
  • That warning message you see is just a result of enabling the setting `Log Slow Pages Taking Longer Than n Seconds` on the Logging Settings page of the ColdFusion administrator. The fact you are not seeing that on the new server shows that they are not configured the same. I would suggest comparing the servers to see what else is different. The `` should take care of the timeout. Assuming you have that set on the initial page that the task is calling if it is calling other templates. – Miguel-F Oct 13 '21 at 17:17

0 Answers0