Copy link to clipboard
Copied
I am using CFHTTP to make calls to a REST API. Occasionally, the server that hosts this API crashes due to the calls we are making (this is a server inside our company's enterprise). When that happens, the CFHTTP calls cause the entire ColdFusion request to hang indefinitely, even when defining a timeout on the tag. This hanging continues to use up resources until eventually our server crashes. I need to find a way to protect our server from a failing CFHTTP call. I am at a loss as to what would cause CFHTTP to ignore a timeout attribute and am hoping for some insight here.
Thanks,
Tim.
Copy link to clipboard
Copied
Charlie Arehart's article, Lies, Damned Lies, and CF Request Timeouts, may be an answer to your question. One solution to the problem could be to run the cfhttp calls in threads that are separate from ColdFusion's main execution thread.