<div dir="ltr"><img src="cid:ii_15a46802337cc902" alt="Inline image 1" width="609" height="282" style="margin-right: 0px;"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 16, 2017 at 11:34 AM, Balu S <span dir="ltr">&lt;<a href="mailto:sbalu27@gmail.com" target="_blank">sbalu27@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div>I have found that if the HTTPConnector times out without receiving the response from the backend API, then somewhere down the line it generates 2 error responses and this is evident from the metrics as it show 2 failures as supposed to 1 failure for the single request.</div><div><br></div><div>So there are 2 issues, </div><div>  - firstly the returned error response contains 2 error XMLs appended to each other and sent to the browser and hence not a valid XML.</div><div>  - The metrics also shows as 2 failure response for single request.</div><div><br></div><div><img name="m_4563853486812866047_null" title="pastedImage.png" src="https://mail.wipo.int/owa/service.svc/s/GetFileAttachment?id=AAMkADM0NWI2NzU5LTk1MjMtNDdmNy04N2E0LWMxNDUzNjJmOWYzZgBGAAAAAACGMRzSgcjFSZ7RHaFCbPpvBwAWk5JFQ9ftSr3fzRzKsAKIAApDCM7FAACU0JDehfk3Ta9vjs7HqL0AAALCdmloAAABEgAQANmupROhSVBKhVuwZgwRs8U%3D&amp;amp;X-OWA-CANARY=RKNZUHXC5k-XJla7hMxOJWa2dgVXVtQIXuAe-JMhmJvrtMAQZfqMzEdYCOlIDnIxxonBze2dqo8." width="585.6" height="267.06266804550154" style="color:rgb(51,102,255);font-family:tahoma,geneva,sans-serif;font-size:13.3333px"><span style="color:rgb(51,102,255);font-family:tahoma,geneva,sans-serif;font-size:13.3333px">​</span><br></div><div>I have been looking the sources but without the way to debug within running application, it quite hard to follow the flow.</div><div><br></div><div>This can be easily simulated with setting very low timeouts (2 secs for ex) in apiman.properties.</div><div><br></div><div><div>apiman-gateway.connector-<wbr>factory.http.timeouts.read=2</div><div>apiman-gateway.connector-<wbr>factory.http.timeouts.write=2</div></div><div><br></div><div>Could you please look at the issue and also If you could guide me how to setup debugging environment, then I can try to fix that as well.</div><div><br></div><div>regards</div><span class="HOEnZb"><font color="#888888"><div>Balu</div></font></span></div>
</blockquote></div><br></div>