Skip to main content
Participant
September 3, 2015
Question

CFHTTP calls hang indefinitely even when timeout is set

  • September 3, 2015
  • 1 reply
  • 683 views

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.

This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
September 5, 2015

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.