hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: HttpClient slowness
Date Tue, 19 Aug 2003 01:38:27 GMT
Hi Pat,

There are a couple of possibilities.  Most likely one of the following 
is happening:

  - You are experiencing a known slowdown due to 
HttpConnection.isStale().  This causes a constant slowdown for every 
method execution.  This is to ensure that a connection is still open 
before it is used.  It seems to effect some platforms more than others. 
  It can be disabled in each of the two connections managers by setting 
connectionStaleCheckingEnabled to false.
  - You are using a 1.4.0_xx JVM.  There is a known bug in 1.4.0 JVMs 
using socket timeouts.  
  - You are using HTTPS in a pre 1.4 JVM.  Again 
HttpConnection.isStale() is the culprit.  Sun JVMs < 1.4 force the 
connection to be closed after calling isStale().  This means 
connections must be opened for each method execution.


On Monday, August 18, 2003, at 07:42 PM, Patrick Lightbody wrote:

> We're noticing around a 150ms overhead and ALL calls (GETs, POSTs, etc)
> when using HTTPClient (tried everything between 2.0 alpha 3 and 2.0
> RC1). The strange thing is that sometimes those overheads drop down to
> 5ms, which is much better and what we expect. Unfortunately, we haven't
> been able to pinpoint _why_ those drops take place yet.
> We've played with various app servers (Resin 2.x and Tomcat 4.1.x),
> using various connectors and connection pools, and nothing seems to 
> help
> out here. We're using HTTP 1.1 and keep alives, and the server and
> client are on the same machine so network latency is not an issue.
> If I use nogoop's HTTP Client or even the JDK's URLConnection, I can 
> get
> responses back around 5ms like I'd expect. Has anyone experienced
> something like this? Any thoughts as to what is going on with
> HTTPClient?
> -Pat

View raw message