hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Terrell" <Steve.Terr...@guideworkstv.com>
Subject RE: socket errors (connection reset, read timed out)
Date Thu, 09 Nov 2006 16:19:07 GMT
A connection timeout error is when the client machine cannot open a
socket connection to the server. That can mean that the server has no
available sockets. It may have simply run out. In our case, we have seen
that problem intermittently, and it may be related to this bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6215050

We have seen the above bug appear, when there are short term connections
(120ms) repeatedly opened and closed over a long period of time (weeks),
but there is a large period of time (minutes) between connections. Our
server is a Tomcat server running JRE 1.5.0_06, if that helps any.


--Steve

-----Original Message-----
From: Eugeny N Dzhurinsky [mailto:bofh@redwerk.com] 
Sent: Thursday, November 09, 2006 11:06 AM
To: httpclient-user@jakarta.apache.org
Subject: Re: socket errors (connection reset, read timed out)

On Thu, Nov 09, 2006 at 05:47:10PM +0200, Eugeny N Dzhurinsky wrote:
> Hi there!
> 
> I was able to remove issues with host did not accept connection within
60
> seconds with setting timeout to 5 minutes, but now I'm getting
randomly
> appearing errors like connection reset and read timed out. I was
fighting with
> similar errors for a week or more, but I was unable to find condition
when such
> errors occurs. The thing is when my application is getting such
errors, I
> still can open the pages which caused this error to appear, with
Firefox - and
> everything works fine. So is it something related to httpclient, or to
JDK, or
> to Linux?


Stack traces:

10/Nov/2006 00:14:38 ERROR [pool-1-thread-1] -
java.net.ConnectException: Connection timed out
java.net.ConnectException: Connection timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:516)
        at java.net.Socket.connect(Socket.java:466)
        at java.net.Socket.<init>(Socket.java:366)
        at java.net.Socket.<init>(Socket.java:239)
        at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.crea
teSocket(DefaultProtocolSocketFactory.
java:79)
        at
org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$1.d
oit(ControllerThreadSocketFactory.java
:90)
        at
org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$Soc
ketTask.run(ControllerThreadSocketFact
ory.java:157)
        at java.lang.Thread.run(Thread.java:595)

09/Nov/2006 17:28:44 ERROR [pool-1-thread-8] - java.net.SocketException:
Connection reset
java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:168)
        at
java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
        at
java.io.BufferedInputStream.read(BufferedInputStream.java:235)
        at
org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)
        at
org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)
        at
org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.jav
a:1115)
        at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpCon
nectionAdapter.readLine(MultiThreadedH
ttpConnectionManager.java:1373)
        at
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBa
se.java:1832)
        at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase
.java:1590)
        at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java
:995)
        at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMe
thodDirector.java:397)
        at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
dDirector.java:170)
        at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
96)
        at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
24)

-- 
Eugene N Dzhurinsky

---------------------------------------------------------------------
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


Mime
View raw message