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: Timeout in HTTP
Date Fri, 06 Jun 2003 16:19:46 GMT
Sorry, I misunderstood the question.  I agree, it is undefined.  It 
appears Socket connect timeout is neither documented nor configurable. 
My guess is that it's dependent on OS and server response.

Mike

Kalnichevski, Oleg wrote:
> Mike, The question is what is the effect of setting connectionTimeout
> to 0. As far as I can see from the code, it does not in fact
> guarantee that the connection will not timeout. What it means that
> HttpClient will not give up waiting on that connection, but it does
> not mean that Socket#Socket constructor would wait indefinitely. Am I
> missing something?
> 
> Oleg
> 
> -----Original Message----- From: Michael Becke
> [mailto:becke@u.washington.edu] Sent: Friday, June 06, 2003 16:23 To:
> Commons HttpClient Project Subject: Re: Timeout in HTTP
> 
> 
> I believe it is being set by HttpClient.execute().  The defaults for
>  soTimeout and connectionTimeout are both 0.
> 
> Mike
> 
> Kalnichevski, Oleg wrote:
> 
>> Well, after having browsed through the source code, I am afraid the
>>  answer is 'undefined'. HttpConnection class invokes 
>> socketFactory#createSocket method, which in its turn calls 
>> Socket#Socket constructor, which in its turn can timeout at any
>> time it sees fit. Does anybody see that differently? I do not think
>>  there's much we can do about it
>> 
>> Oleg
>> 
>> -----Original Message----- From: George Gastaldi 
>> [mailto:george.gastaldi@neogrid.com.br] Sent: Friday, June 06, 2003
>>  15:53 To: Commons HttpClient Project Subject: RE: Timeout in HTTP
>> 
>> 
>> Yes, that's the point. However, I do not set any value for
>> setTimeout in HTTPClient. And it is thrown after one minute in
>> average... What's the default value if nothing is set up ?
>> 
>> -----Original Message----- From: Kalnichevski, Oleg 
>> [mailto:oleg.kalnichevski@bearingpoint.com] Sent: Friday, June 06, 
>> 2003 10:45 AM To: Commons HttpClient Project Subject: RE: Timeout
>> in HTTP
>> 
>> 
>> George,
>> 
>> Please note that HttpConnection.ConnectionTimeoutException
>> represents a connection timeout (set with
>> HttpClient#setConnectionTimeout), not a read timeout (set with
>> HttpClient#setTimeout). Can it be that this confusion is the source
>> of the problem?
>> 
>> Oleg
>> 
>> -----Original Message----- From: George Gastaldi 
>> [mailto:george.gastaldi@neogrid.com.br] Sent: Friday, June 06, 2003
>>  13:55 To: Commons HttpClient Project Subject: RE: Timeout in HTTP
>> 
>> 
>> That's strange, because even when I do not set anything, the 
>> connection times out for about 1 minute, throwing a 
>> HttpConnection.ConnectionTimeoutException. Setting explicitly to 0 
>> will never timeout ?
>> 
>> Thank you for the answer.
>> 
>> -----Original Message----- From: Ortwin Gl├╝ck 
>> [mailto:ortwin.glueck@nose.ch] Sent: Friday, June 06, 2003 3:26 AM
>>  To: Commons HttpClient Project Subject: Re: Timeout in HTTP
>> 
>> 
>> Michael Becke wrote:
>> 
>> 
>>> I am assuming you are talking about SO_TIMEOUT set via 
>>> HttpClient.setTimeout().  This is the amount of time to wait when
>>>  reading on an open socket.  This defaults to 0 which means that
>>> it will wait forever.
>> 
>> 
>> "forever" means "until the server is bored and closes the
>> connection" :-)
>> 
>> 
>> ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: 
>> commons-httpclient-dev-unsubscribe@jakarta.apache.org For
>> additional commands, e-mail:
>> commons-httpclient-dev-help@jakarta.apache.org
>> 
>> ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: 
>> commons-httpclient-dev-unsubscribe@jakarta.apache.org For
>> additional commands, e-mail:
>> commons-httpclient-dev-help@jakarta.apache.org
>> 
>> ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: 
>> commons-httpclient-dev-unsubscribe@jakarta.apache.org For
>> additional commands, e-mail:
>> commons-httpclient-dev-help@jakarta.apache.org
>> 
> 
> 
> 
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail:
> commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional
> commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail:
> commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional
> commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
> 


Mime
View raw message