We have a legacy page (in CF2018) that calls anoth...
# cfml-beginners
n
We have a legacy page (in CF2018) that calls another to do some processing through a cfhttp and then logs that it's complete:
Copy code
<cfhttp url="#myURL#/processAction.cfm" timeout="10800" method="get" />

<cfquery name="insertLog" datasource="#myDSN#">
	INSERT INTO ActionLog
	   (ActionName,
	   Complete)
	VALUES
	   ('Process Action',
	   1)
</cfquery>
In
processAction.cfm
there's whole mess of logic ending with it's own INSERT into a DB log as the very last thing in the file. The issue is that
processAction.cfm
logs its final query around 30 minutes after being called, but the query above (right after the
cfhttp
) is timestamped 3 hours after being called, which corresponds to the
timeout="10800"
. What could cause
processAction.cfm
to reach its last line and finish its work in 30 minutes but not return a response to the
cfhttp
, causing the
cfhttp
to wait and wait till its timeout? (Again, this is legacy and I could rewrite it, but just trying to understand this behavior.)
r
Just a guess, but the web server on the other end might have a shorter timeout than 30 minutes, and they usually do, so you never receive a response. CF will happily continue processing a request even though the web server no longer cares.
I would look at the web server logs on the server you are calling.
n
It's all on the same server. 😕 Both files have a timeout of 10800
e
You may want to look into grabbing the file with cf_curl or just downloading it with cfhttp, then running CFexecute to manually load the file using a native command line. Run ithe download with coldfusion, then manually test the import first, you may find your file contains errors, and if the errors are consistent you may need to manipulate the file before you insert it into your database.
n
Thanks. There are definitely some re-work options that I'd like when time permits.