tracker issue : CF-3979379

select a category, or use search below
(searches all categories and all time range)
Title:

CFHTTP Timeout does not include time to read data via HTTPS

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/CannotReproduce

Reporter/Name(from Bugbase): Andrew G. / Andrew G. (Andrew G.)

Created: 04/30/2015

Components: Net Protocols, HTTP

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: ALL / Win 2012 Server x64

Vote Count: 0

Problem Description:

We use CFHTTP for communication with some REST APIs using HTTPS. Sometimes there are networking issues that cause socket stuck in READ state. We have noticed that in ColdFusion 11 the timeout  is not triggered in this state, which causes CFHTTP to hang indefinitely and eventually this results in ColdFusion server hang. The threads hang in this state:
java.net.SocketInputStream.socketRead0(SocketInputStream.java:???)

Below is a simple isolated example on how to reproduce this problem without simulating bad networking conditions. It includes 2 scripts:
1. A script that slowly returns data
2. A script with CFHTTP (over HTTPS) and Timeout lower than time for 1st script to return data.
It is expected for 2nd script to timeout before it is able to read all the data, however it is not the case.  

Steps to Reproduce:
script 1: testCFHttpTimeout.cfm (this script has to execute for longer than 1 second, increase index if necessary):
<cfloop index="randomindex" from="1" to="500000" step="1"> 
<cfoutput>a</cfoutput><cfflush> 
</cfloop> 

script 2: testAG.cfm (this script should load the 1st script via HTTPS):
<cfsetting requesttimeout="30" showdebugoutput="Yes" enablecfoutputonly="Yes">	

<cfoutput>
#now()#
<cfhttp url="https://www.berlitzvirtualclassroom.com/testing/testCFhttpTimeout.cfm" method="GET" timeout="1"></cfhttp>	

<h1>https://www.berlitzvirtualclassroom.com/testing/testCFhttpTimeout.cfm Timeout Test : timeout seconds: 1</h1>

#now()#
</cfoutput>

Actual Result:
Output:
>>>{ts '2015-04-13 09:33:23'}
>>>https://www.berlitzvirtualclassroom.com/testing/testCFhttpTimeout.cfm Timeout Test : timeout seconds: 1
>>>{ts '2015-04-13 09:33:32'}
Script ran for 9 seconds while timeout is 1 second

Expected Result:
>>>{ts '2015-04-13 09:33:23'}
>>>https://www.berlitzvirtualclassroom.com/testing/testCFhttpTimeout.cfm Timeout Test : timeout seconds: 1
>>>{ts '2015-04-13 09:33:24'}
Script should run for 1 second. CFHTTP should abort after 1 second of reading the data.

Any Workarounds:
None found.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3979379

External Customer Info:
External Company:  
External Customer Name: Andrew
External Customer Email:  
External Test Config: My Hardware and Environment details:

Windows 2012R2, IS 8.5, ColdFusion 11 Update 3 Standard, Java 8.0.25

2 virtual cores of E5-2620, 8GB RAM

Attachments:

Comments:

Unable to repro this issue. The server does not hung and request runs out after specified timeout period. Please provide more details to repro. Thanks.
Comment by Akhila K.
7685 | June 05, 2015 03:12:21 AM GMT
Hi Andrew, We are closing this bug, since we could not repro. Please let us know if you come across this issue again. We will re-open this bug then. Thanks, Akhila.
Comment by Akhila K.
7686 | September 23, 2015 04:05:31 AM GMT