You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Steven Terrell <St...@guideworkstv.com> on 2005/10/10 19:33:33 UTC

Socket management

I am using HttpClient 3.0 RC3 to talk to a servlet on Tomcat (5.5.9 I
think.) My application is using the MultiThreadedConnectionManager. There is
a 5 second timeout for each request made to Tomcat. My code calls
PostMethod.releaseConnection in the finally clause, as the examples do. I am
interested in understanding what happens with the socket (client and server
side) when that timeout value is reached. Particularly, what happens if the
Tomcat servlet still tries to send a response even though I have timed out?

 

If there is a good link I can follow to answer this question, please post
it! Thanks,

 

Steve Terrell

 


Re: Socket management

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, Oct 10, 2005 at 11:33:33AM -0600, Steven Terrell wrote:
> I am using HttpClient 3.0 RC3 to talk to a servlet on Tomcat (5.5.9 I
> think.) My application is using the MultiThreadedConnectionManager. There is
> a 5 second timeout for each request made to Tomcat. My code calls
> PostMethod.releaseConnection in the finally clause, as the examples do. I am
> interested in understanding what happens with the socket (client and server
> side) when that timeout value is reached. Particularly, what happens if the
> Tomcat servlet still tries to send a response even though I have timed out?
> 
> 

Steven,

I believe a socket timeout exception will leave the socket in pending
close state, thus rendering it unusable for any further I/O operations.

HttpClient will always close the connection, which threw an IOException
(such as SocketTimeoutException). The server socket in its turn will end
up throwing a SocketException: "Software caused connection abort: socket
write error" as a result of this

Oleg

> 
> If there is a good link I can follow to answer this question, please post
> it! Thanks,
> 
>  
> 
> Steve Terrell
> 
>  
> 

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