hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Crawford <samcrawf...@gmail.com>
Subject Behavioural difference between 4.0b2 and 4.0-rc1
Date Tue, 07 Jul 2009 08:58:11 GMT
Morning all,
We upgraded our application to use HttpClient 4.0-RC1 last weekend and
observed a change in behaviour from 4.0-beta2 that I wanted to make you
aware of (it may well be by design, just want to check!).

Firstly, I should say that there was a clear error in our code, meaning that
if the response code was non-2xx we would not read the entire response
stream from the HttpClient properly. This would in turn mean that the
connection was not released automatically and readded to the pool. This is
where the difference lies:

1. In 4.0-beta2 there appears to be some background collector that forcibly
closes connections that have ended up in this state (the log line reads
"Connection garbage collected...")
2. In 4.0-RC1 there is no such collecting process taking place (which in
turn led to the connections not being closed, resulting in the connection
pool being exhausted).

I've attached traces of the occurrence. The comparison was made by using
precisely the same application code and just swapping between the different
httpclient JARs.

Again, the problem was clearly mine with the handling of the response
stream. However, there is clearly a difference between beta2 and RC1, and I
just wanted to make sure it was expected behaviour.

Thanks,

Sam

Mime
View raw message