hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Berlin" <sber...@gmail.com>
Subject Keep-Alive timeout & persistent connections
Date Wed, 25 Jun 2008 21:14:48 GMT
Hi Folks,

We just stumbled across an issue with persistent connections where the
server is sending a Connection: Keep-Alive header, but also a
Keep-Alive header with a timeout=## (and a max=##).  HttpClient's
connection management sees that the connection can be kept alive, so
pools it for potential reuse, but doesn't respect the timeout (or max)
values.  The problem is that the connection remains opens from the
eyes of HttpClient.  A subsequent request sends correctly (with no
IOX's, oddly enough), but reading causes HttpClient to read a -1 and
throw a NoHttpResponseException.  This is against a run-of-the-mill
Apache httpd server.

This is normally supposed to be handled by a HttpRequestRetryHandler,
to retry to the connection, but I'm wondering if it shouldn't even get
there in the first place.  Should HttpClient respect the Keep-Alive
header's timeout (and max, or other) token and use a new connection in
the first place?


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

View raw message