You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Eric Fung <ef...@acm.org> on 2012/07/19 03:23:11 UTC

Closing connection on failure in AutoRetryHttpClient

I'm using release 4.2.1's AutoRetryHttpClient and trying to track down
why my issued connections keeps going up when I have a retry strategy
in place, and the server responds with a 503.

>From looking at the method:

execute(HttpHost target, HttpRequest request, HttpContext context)

it appears to me that in the for loop that implements the retry
behaviour, the HttpResponse is not consumed if a retry should be
attempted. On subsequent iterations, the backend creates new
HttpResponse objects, leading to connections that are never closed.

Am I reading this correctly?

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Closing connection on failure in AutoRetryHttpClient

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2012-07-18 at 21:23 -0400, Eric Fung wrote:
> I'm using release 4.2.1's AutoRetryHttpClient and trying to track down
> why my issued connections keeps going up when I have a retry strategy
> in place, and the server responds with a 503.
> 
> From looking at the method:
> 
> execute(HttpHost target, HttpRequest request, HttpContext context)
> 
> it appears to me that in the for loop that implements the retry
> behaviour, the HttpResponse is not consumed if a retry should be
> attempted. On subsequent iterations, the backend creates new
> HttpResponse objects, leading to connections that are never closed.
> 
> Am I reading this correctly?
> 

Yes, you are. It is obviously a bug. Please raise a JIRA for this
defect.

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org