Hi there,

Timeout settings in your code appear correct. Basically socket reads _should_ timeout, 
provided the value of transferTimeout is sane. For the lack of better ideas I can only 
recommend you:

(1) upgrade to 2.0rc3 release. Better yet, upgrade to the latest CVS 
HTTPCLIENT_2_0_BRANCH snapshot (which is quite likely to be the 2.0 final). We've just 
recently fixed a minor bug with socket timeouts in persistent connections. I do not 
think you are affected by this bug, but just to be on the safe side

(2) Try setting timeout to a ridiculously low value just to see whether read timeouts 
work at all in your environment.

(3) Give JVM 1.4.2 a shot to see if that makes any difference (especially if you are 
using SSL. Older JSSE implementations seem to have an issue with socket timeouts)

(4) Please introduce yourself. I kind of dislike 'hi there' greetings ;-)

Oleg 



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 15:06
To: Commons HttpClient Project
Subject: Re: Question on Timeouts






Hello,

Thank you for your e-mail...I'm confused a bit, though, as you said:

<quote>
Try specifying an SO_TIMEOUT in milliseconds via HttpClient.setTimeOut()
method.
</quote>

But, we're already doing this, no?

>         client.setTimeout (transferTimeout * 1000);

And we're still seeing threads hung indefinitely in socketRead.....now, someone
else responded saying that I should also include this:

<quote>
HttpClient().getHostConfiguration().setHost(HOSTNAME, 80,"http" );
where hostname is something like that "www.blabla.com"
</quote>

I'm going to try that, but any other thoughts on why this is hanging
indefinitely?

Thanks!!!!!!




                                                                                       
                                          
                      "Jesus M. Salvo                                                  
                                          
                      Jr."                     To:      Commons HttpClient Project 
<[EMAIL PROTECTED]>   
                      <[EMAIL PROTECTED]         cc:                                   
                                            
                      asia.com>                bcc:                                    
                                          
                                               Subject: Re: Question on Timeouts       
                                          
                      02/12/2004 08:20                                                 
                                          
                      PM                                                               
                                          
                      Please respond                                                   
                                          
                      to "Commons                                                      
                                          
                      HttpClient                                                       
                                          
                      Project"                                                         
                                          
                                                                                       
                                          
                                                                                       
                                          




[EMAIL PROTECTED] wrote:

>
>
>Hello,
>
>I'm using your product for an application that we're building (that fetches
some
>HTTP content) and I'm running into an issue where it isn't timing out
>
>
< ..snip...>

>----------This is how we're connecting -----------------
>
>         HttpClient client = new HttpClient();
>         client.setConnectionTimeout (connectionTimeout * 1000);
>         client.setTimeout (transferTimeout * 1000);
>         HttpMethod method = new GetMethod(url);
>try {
>         statusCode = client.executeMethod(method);
>      }
>
>
>
Try specifying an SO_TIMEOUT in milliseconds via HttpClient.setTimeOut()
method.
Otherwise, it will default to whatever is the default SO_TIMEOUT on your
platform.

BTW, does anyone have a compilation / list of the defautl SO_TIMEOUT
values for each platform ?





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to