Hello,
While doing the Cloudant swift test, we are getting truncated response when POST a _changes query to the CouchDB with document ID [ <http://docs.couchdb.org/en/2.0.0/api/database/changes.html>http://docs.couchdb.org/en/2.0.0/api/database/changes.html]. We are getting the failure very frequent while doing the test from a swift client on Linux with couchDB 2.0 as server. We compared the TCP stream of the passing and failing case and the request is exactly the same. Hence, we believe there is something going wrong while processing the request on the CouchDB side as we are getting the truncated response. Another interesting observation is that if we introduce a small delay (sleep) before writing the request body on the swift client side, the test is passing (the response from CouchDB is proper). Hence, we think this could be a timing related issue on the CouchDB side. While doing the same Cloudant swift test from Mac OS, we are observing the failure very rarely. We believe it could be the change in timing which hide the issue similar to when we introduce the delay while testing on Linux. The response from the CouchDB has three chunks. The first chunk is a standard text {"results”:[, the second chunk is the actual response and the last chunk is the standard stream terminator sequence. In the failing case, we are getting only the first chunk. Hence, it seems the failure occurred while processing the response on the CouchDB side. We have taken the CouchDB trace and Wireshark trace from the server side and we could confirm that the request is exactly the same between the passing and failing case where as the response is truncated on the CouchDB side during the failure. Please let us know whether you are aware of any such issues on the CouchDB side and what diagnostic documents are required for you to do the analysis.
Thank you,
Nasser Ebrahim

Reply via email to