On Wed, 2013-01-16 at 15:22 -0500, Mark Claassen wrote:

Basically 'connection reset' errors are a direct result of a general
limitation of the blocking I/O model: when not blocked in an I/O
operation there is no way for the socket to get notified of the opposite
endpoint terminating the connection. While kept alive in the pool
blocking HTTP connections can get stale. However, the only way to find
it out is to try to attempt an I/O operation on such connection.

> I noticed that there is a stale connection check:
> params.setBooleanParameter(AllClientPNames.STALE_CONNECTION_CHECK, 
> Boolean.TRUE);
> 
> Is this something that I should be using?  I am connecting to the same source 
> over and over again.
> 
> Mark
> 

Yes, this is what you should be using. Another alternative would be
pro-actively evicting expired connections and connections that have been
idle longer than a given period of time.

Oleg


> -----Original Message-----
> From: Mark Claassen [mailto:[email protected]] 
> Sent: Wednesday, January 16, 2013 3:07 PM
> To: 'HttpClient User Discussion'
> Subject: Connection Reset errors
> 
> I have a user getting a lot of Connection Reset errors.  I did not think this 
> had do to with HttpClient, so much as other factors on
> her machine and the server.  However, I did a bit of searching and see that 
> people have commented on this error with HttpClient
> before.  I just upgraded to HttpClient 4.2.3 to see if that would help at 
> all, and it didn't.
> 
> This user is fine for a while, and then will get the Connection Reset error.  
> She then just retries the request, and it works.  Any
> tips on how to resolve this would be greatly appreciated.
> 
> Thanks,
> Mark
> 
> We are using Tomcat 7.0.27, and the Connector is configured like this:
>                 <Connector
>                         port="5502"
>                         protocol="org.apache.coyote.http11.Http11NioProtocol"
>                         server="Unknown"
>                         connectionLinger="0"
>                         socket.soTimeout="300000"
>                         SSLEnabled="true"
>                         maxThreads="150"
>                         scheme="https"
>                         secure="true"
>                         clientAuth="false"
>                         keystoreFile="-----"
>                         keystoreType="PKCS12"
>                         keystorePass="-----"
>                         sslProtocol="TLS"
>  
> ciphers="SSL_RSA_WITH_RC4_128_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES
> _128_CBC_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA"/>
> 
> 
> ---- (1) ---- Throwable - Class (class java.net.SocketException)
>    Message (Connection reset)
>    at java.net.SocketInputStream.read(Unknown Source)
>    at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source)
>    at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
>    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
>    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown 
> Source)
>    at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
>    at 
> org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
>    at 
> org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:90)
>    at 
> org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:212)
>    at 
> org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:177)
>    at 
> org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:138)
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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