tracker issue : CF-3920947

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

org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxIOException: Attempted read on closed stream.

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/ThirdParty

Reporter/Name(from Bugbase): Stephen Baker / Stephen Baker (Stephen Baker)

Created: 01/14/2015

Components: Web Services

Versions: 10.0

Failure Type: Crash

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Problem Description:
Under high or persistent load, when using ColdFusion as a client for a WCF webservice on localhost an exception is thrown on an AxisFault.  The stack trace is attached to this ticket, it was too long to paste here.

Note that we do this as a way to share code between different languages.

Actual Result:
Above exception is thrown.

Expected Result:
Web service method should be returning an integer

Any Workarounds:
Not aware of any

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

Watson Bug ID:	3920947

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

Windows 2008 R2 x64

IIS 7.5

ColdFusion 10

.NET 4.5

ColdFusion 10 Enterprise Edition (Patched to update 15)


  1. January 14, 2015 00:00:00: 1_axis2_stacktrace.txt


After a long search I found this bug from Apache's http client: Is there any possibility of updating to http client 4.x in ColdFusion?
Comment by External U.
8974 | January 14, 2015 09:44:18 AM GMT
Ok, I've discovered both the cause and the workaround. I had been doing the CreateObject('webservice'....) in OnApplicationStart and reusing it for every page which worked fine in CF9. In CF10 this breaks when pages use the same object concurrently. As a workaround CreateObject every time you want to use the web service.
Comment by External U.
8975 | January 14, 2015 09:15:58 PM GMT
Please provide us the code snippet to repro the case, both for ColdFusion(client) part and WCF part. Also let us know the update number on which ColdFusion 10 is running. We have upgraded http client library, so is this issue occurring with ColdFusion + latest update environment?
Comment by Akhila K.
8976 | February 16, 2015 01:41:16 AM GMT
The code is mostly irrelvant. In application.cfc have something like (from our code): <CFFUNCTION name="onApplicationStart" returntype="boolean" output="false"> <CFSET application.ermsInternalWS = CreateObject('webservice', 'http://localhost:8888/ErmsInternal/ErmsInternal.svc?wsdl')> ... </CFFUNCTION> Then on one or more pages access that webservice with something like: <CFSET variables.LatLon = application.ermsInternalWS.GeocodeAddress(attributes.address1,, attributes.province, attributes.postcode,, true)> <CFSET attributes.Latitude = variables.LatLon.getLatitude()> <CFSET attributes.Longitude = variables.LatLon.getLongitude()> I can't share the specifics of our Geocode WCF function, but the idea is to have the call take a variable amount of time, e.g. between 100ms and 3s. and to have several coldfusion pages calling it at once. I believe when the first page is finished with the request it closes the connection on all the other pages that might be requesting at the same time. I also don't think it's related to the HttpClient version anymore, just with concurrency.
Comment by External U.
8977 | March 20, 2015 06:48:15 AM GMT
There is also a fairly simple workaround. Creating a new webservice object on every request instead of sharing one in the application scope fixes it.
Comment by External U.
8978 | March 20, 2015 06:49:33 AM GMT
The stubs generated by Axis 2 are not threasafe. A bug is already raised on Axis 2 for the same. They have replied it is as per design. As the reporter said, the workaround is to use different stub instances and not allow concurrent calls on the same instance.
Comment by Paul N.
8979 | October 29, 2015 02:37:00 AM GMT