Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 15974 invoked from network); 9 Nov 2006 16:22:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Nov 2006 16:22:35 -0000 Received: (qmail 47733 invoked by uid 500); 9 Nov 2006 16:22:45 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 47718 invoked by uid 500); 9 Nov 2006 16:22:45 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Delivered-To: moderator for httpclient-user@jakarta.apache.org Received: (qmail 38509 invoked by uid 99); 9 Nov 2006 16:19:43 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: socket errors (connection reset, read timed out) Date: Thu, 9 Nov 2006 11:19:07 -0500 Message-ID: <19FBA0BAF7AD2F4081C0FE36832A6E8401793F88@GWDC04.GuideWorks.TV> In-Reply-To: <20061109160549.GA26647@office.redwerk.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: socket errors (connection reset, read timed out) Thread-Index: AccEGPtLyNYTMR79RHS3jl/8kzpkYAAAQIPQ From: "Steve Terrell" To: "HttpClient User Discussion" X-Virus-Checked: Checked by ClamAV on apache.org 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=3D6215050 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]=20 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! >=20 > 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.(Socket.java:366) at java.net.Socket.(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) --=20 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