hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angie Lin ...@heyang.org>
Subject Re: timeout in 3.0-beta1
Date Wed, 01 Dec 2004 21:07:06 GMT
Doh!  There's another variable that i didn't consider which I think is  
the culprit.  I'm registering a custom https protocol handler.  When I  
did everything non-ssl, then the timeout worked properly.

Sorry for the spam.

On Dec 1, 2004, at 12:56 PM, Angie Lin wrote:

> Hmm, so I switched to a bogus IP address on our internal network.
>
> I am getting: java.net.ConnectException: Connection Timed out
>
> but it's still taking about 3 minutes instead of 10 seconds.  I  
> haven't done the trace logging yet...
>
>
>
> On Dec 1, 2004, at 12:26 PM, Oleg Kalnichevski wrote:
>
>> Angie,
>>
>> "java.net.UnknownHostException: some.nonexistent.com" basically has
>> nothing to do with the connect timeout. The application spends all  
>> this
>> time trying to resolve the DNS name and not trying to connect to the
>> server.
>>
>> Hope this helps
>>
>> Oleg
>>
>>
>> On Wed, 2004-12-01 at 12:03 -0800, Angie Lin wrote:
>>> I'm specifying a completely non-existent url to test the connection
>>> timeout.  That should work, right (i.e. non-existent url)?
>>>
>>> Anyways, it doesn't appear to work even though I'm setting the
>>> connection timeout on client, connection manager, AND the method.
>>>
>>> Angie
>>>
>>>
>>> On Dec 1, 2004, at 11:57 AM, Oleg Kalnichevski wrote:
>>>
>>>> Angie,
>>>>
>>>> You are not confusing socket (read) timeout with connect (establish
>>>> connection) timeout, are you? To my knowledge timeouts work as
>>>> advertised.
>>>>
>>>> Oleg
>>>>
>>>> On Wed, 2004-12-01 at 11:23 -0800, Angie Lin wrote:
>>>>> Do the timeouts work?
>>>>>
>>>>> I've tried:
>>>>>
>>>>>    int CONN_TIMEOUT=10000;
>>>>>    HttpClient client=new HttpClient();
>>>>>    // set timeout on client
>>>>>    client.setConnectionTimeout(CONN_TIMEOUT);
>>>>>    client.getParams().setParameter("http.connection.timeout",
>>>>>                                    new Integer(CONN_TIMEOUT));
>>>>>
>>>>>    // set timeout on connection manager
>>>>>
>>>>> client.getHttpConnectionManager().getParams().setParameter("http.co 
>>>>> nne
>>>>> ct
>>>>> ion.timeout",
>>>>>                                                               new
>>>>> Integer(CONN_TIMEOUT));
>>>>>
>>>>>    // set timeout on method
>>>>>    GetMethod get=new
>>>>> GetMethod("http://some.nonexistent.com/somepage.html");
>>>>>    get.getParams().setParameter("http.connection.timeout", new
>>>>> Integer(CONN_TIMEOUT));
>>>>>    get.setHttp11(true);
>>>>>
>>>>>    client.executeMethod(get);
>>>>>
>>>>>
>>>>> But it still takes roughly 3 minutes instead of the 10 seconds I
>>>>> expected.  Is there a different way for specifying the timeout?
>>>>>
>>>>> --
>>>>> Angie Lin
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------- 
>>>>> --
>>>>> To unsubscribe, e-mail:  
>>>>> httpclient-user-unsubscribe@jakarta.apache.org
>>>>> For additional commands, e-mail:
>>>>> httpclient-user-help@jakarta.apache.org
>>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------------- 
>>>> -
>>>> To unsubscribe, e-mail:  
>>>> httpclient-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:
>>>> httpclient-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:  
>>> httpclient-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:  
>>> httpclient-user-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:  
>> httpclient-user-help@jakarta.apache.org
>>
>>
>>
>>
>
>
> 
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:  
> httpclient-user-help@jakarta.apache.org
>


!DSPAM:41ae32b3241623254615359!


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message