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: Multiple httpclient sessions and hanging??
Date Wed, 11 Jun 2003 19:09:25 GMT
Hi Jan,

It is difficult to be sure without a little more detail.  At this point 
my only guess is that you are running out of sockets (on either the 
client or server) and/or HttpConnections.  It is good that you are using 
Beta1.  Alpha3 had some serious problems, particularly with posts and 
threading.  Here are a few things that will help to narrow this problem 

  - are you using the MultiThreadedHttpConnectionManager?
    - if so, are you using a connectionFactory timeout? see 
    - if not, how are you managing connection resources?  Are you sure 
that connections are being closed?
  - are any exceptions being printed?
  - are you calling HttpMethod.releaseConnection() after each execution?
  - also, try setting SO_TIMEOUT to something reasonable using either 
HttpClient.setTimeout() or HttpConnection.setSoTimeout().  If the 
execution of a method is stalling in the middle of a read this will 
force an exception.


Jan Gonsalves wrote:
> I'm seeing a problem where I have two very similar HttpClient apps 
> running in different JVMs.  I ran App1 with Beta1 for 20+ ours straight 
> and it just chugged along and did it's thing.  I started App2 with 
> Alpha3 this morning and the minute it came up, App1 hung.  Definition of 
> Hung: "In the middle of downloading information, often from a file on a 
> foriegn FTP server using a ZipInputStream, program never returns from 
> reading stream. How ever, sometimes it has "hung" when doing a 
> ExecuteMethod cal."  We have seen cases where App1 has been hanging and 
> we were hoping it was some timeout or something that had been fixed in 
> Beta 1.  I changed the second app to use BEta1 and ran them together for 
> a 5+ hours and just recently noticed App1 hung again.  It only seems to 
> happen when App2 is running on the same machine, I never ran into this 
> while in development because App2 was developed on a separate machine.
> The thing that kills me is App2 never has this issue.  Some application 
> notes:
> Incremental Updates - Both Apps run for a couple minutes and then sleep 
> for 10.  While sleeping no connections are kept open.
> App1 reads zip files on a FTP server, App2 reads input streams from the 
> response body
> App1 performs signifigantly less POST/GET calls than App2.  App1 
> requests information to be created and then put on the FTP server, Files 
> are read from there and not downloaded(Most, not all hangs happen here), 
> App2 requests information and it's sent via the response body.
> I know this is vague, I'm just wondering if anyone knows of problems 
> running multiple HttpClient Apps.  I'm going to run with the log on from 
> now on, but it can take so long for the problem to occur it fills up 
> disk space pretty rapidly.
> Any ideas would be greatly appreciated.
> Jan Gonsalves
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
> commons-httpclient-dev-help@jakarta.apache.org

View raw message