Skip to main content
mattj53954041
Participant
October 10, 2021
Question

Coldfusion 2018 The request has exceeded the allowable time limit Tag: cfhttp

  • October 10, 2021
  • 3 replies
  • 3123 views

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?

    This topic has been closed for replies.

    3 replies

    mattj53954041
    Participant
    October 12, 2021

    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: /opt/web/my-prod/secure/admin/coursesCron/writeData.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?

    Charlie Arehart
    Community Expert
    Community Expert
    October 13, 2021

    I'm not aware of one. But let's focus on the differences between where you say such sched tasks work (can run long) and cannot: same os? same CF verison and update? same settings for the sched tasks? same url for the task itself?

    /Charlie (troubleshooter, carehart. org)
    Charlie Arehart
    Community Expert
    Community Expert
    October 12, 2021

    I suspect this issue is not about your code and your use of cfhttp, but rather the cf scheduled task mechanism making the call to the task url USING cfhttp.

     

    And as for the timeout, this is a relatively new issue (the past couple of releases) where cf has removed the ability to control the timeout of a task...and as such it times out in 60 seconds because of a timeout in the underlying quartz library.

     

    I've tried to solve this and been unable. Reach out to cfsup@adobe.com to ask them about it, pointing them here. Perhaps they will offer more, to you or here, and perhaps they may point you/us to a ticket at tracker.adobe.com where this is discussed. 

    /Charlie (troubleshooter, carehart. org)
    mattj53954041
    Participant
    October 12, 2021

    Thanks, will do.

    George____
    Inspiring
    October 12, 2021

    Any chance that your scheduled task is calling a different page than you're running manually?    When we went from CF11 to CF2018 we also migrated servers.   Our server admin accidentally left all the scheduled tasks pointing to the old server which was still up and running.    Another way to verify is to put something at the top of your file you can check to make sure it ran.   A cffile to write a file, or a SQL insert, whatever you think is best to serve as an indicator.

    mattj53954041
    Participant
    October 12, 2021

    Double checked, and we are calling the correct file.