Copy link to clipboard
Copied
I have several templates in their own Application that I run as CF Scheduled Tasks. Each template has the same basic functionality - call a CFC to make a request to an external API via CFHTTP and save the data in the response to the database using SQL Stored Procedures. All of them run fine with no errors. However, every time just one of these templates is executed, a Request Timed Out message is logged in exception.log, even though the page does not time out and runs to completion:
"The request has exceeded the allowable time limit Tag: cfhttp"
I am logging each request to log the time it takes to complete and confirm that it completes successfully, and every request completes in about 15 seconds, which is expected.
I have added "setting requestTimeout=30;" the CFM template in an attempt to prevent the errors from being logged, but they still do, every time.
Any idea what is going on here? I know it's an innocuous error, but, I'd still like to get to the bottom of this.
CFM:
<cfscript>
setting requestTimeout=30;
import cfc.myData.widgetsUpdate;
LOCAL.widgetsUpdate=
new widgetsUpdate();
LOCAL.widgetsUpdate
.run();
</cfscript>
CFHTTP call:
component {
private struct function apiRead() {
cfhttp(
url=LOCAL.myURL,
method="GET",
result="LOCAL.ApiHttpResult"
) {
....
}
return LOCAL.ApiHttpResult;
}
}
Have something to add?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now