Thanks, Oleg. If I implement "retry", It may resolve #1 of 3 issues that I have. Again, I was running into 1) Connection Reset - Client is trying write/send a request, connection broken - "retry" perfectly work 2) Broken Pipe - Client is trying to read the response from server, connection broken. In this situation, If I "retry", I see HttpClient retries entire request, which could cause server to receive duplicate requests, which is not desirable. 3) Server failed to respond error - NoHttpResponseException - I think it is similar to #2 above.
-----Original Message----- From: Oleg Kalnichevski [mailto:ol...@apache.org] Sent: Wednesday, March 30, 2011 9:10 AM To: HttpClient User Discussion Subject: RE: Stale Connection Check On Tue, 2011-03-29 at 23:11 -0500, Vadheraju, Rajeshwar wrote: > Oleg, Thanks for your response. > We can't upgrade to 4.1 in a day or two as the mentioned errors are occurring > in Production environment. We will consider moving to 4.x in near future(may > be in the next release), thanks for your suggestion. > > I went through link that you provided , In "2.10. Connection eviction > policy", it reads like "...The stale connection check is not 100% reliable..." > > So my question is why stale connection check is not reliable, doesn't matter > whether it is version 3.1 or 4.x? > HTTP connection can be closed by either endpoint and become 'stale' on the opposite end at any given moment. There is always a window, albeit small, between a successfully completed stale connection check and flushing of the internal session buffer containing the outgoing request message, in which the underlying connection can become stale without Httpclient's noticing until it is too late. I would go as far as saying that the stale connection check is useless and evil. It by no means can be used as a substitute for a sensible request retry / recovery mechanism. Hope this helps Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. _____________