Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 30270 invoked from network); 6 Jun 2008 14:27:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jun 2008 14:27:59 -0000 Received: (qmail 53462 invoked by uid 500); 6 Jun 2008 14:28:01 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 53435 invoked by uid 500); 6 Jun 2008 14:28:01 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 53424 invoked by uid 99); 6 Jun 2008 14:28:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2008 07:28:01 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [217.150.250.44] (HELO ok2consulting.nine.ch) (217.150.250.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2008 14:27:12 +0000 Received: by ok2consulting.nine.ch (Postfix, from userid 1002) id 4C1A3198067; Fri, 6 Jun 2008 16:27:28 +0200 (CEST) Received: from [10.14.8.87] (unknown [213.55.131.1]) by ok2consulting.nine.ch (Postfix) with ESMTP id 84AAD198065 for ; Fri, 6 Jun 2008 16:27:26 +0200 (CEST) Subject: Re: HttpClient 4, I/O exception and From: Oleg Kalnichevski To: HttpComponents Project In-Reply-To: <200806061608.12187.m.zdila@mwaysolutions.com> References: <200806040940.44490.m.zdila@mwaysolutions.com> <200806061543.23666.m.zdila@mwaysolutions.com> <1212760680.9179.32.camel@ubuntu> <200806061608.12187.m.zdila@mwaysolutions.com> Content-Type: text/plain; charset=utf-8 Date: Fri, 06 Jun 2008 16:27:01 +0200 Message-Id: <1212762421.9179.41.camel@ubuntu> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1.1 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on ok2consulting.nine.ch X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham version=3.0.3 On Fri, 2008-06-06 at 16:08 +0200, Martin Zdila wrote: > > > i would be happy if we could find out why those "I/O Exception"s are > > > occuring and to fix it. > > > > Most likely this is because the connection timed out on the server side. > > The target server dropped it, but the JVM on the client-side failed to > > detect it. Next time the connection is retrieved from the pool and > > re-used on the client side it blows up an I/O exception. This appears to > > be a local connectivity problem, something I was trying to tell all > > along. > > So are those "I/O Exception" absolutely normal and expected actually? Connectivity problems are absolutely normal and are to be expected > Or > should JVM on the client-side be able to detect it? > A fundamental problem with classic / blocking I/O is that the _only_ way to find out if the socket is still open is to read from it. This is what the stale connection check is meant to do, but it cannot be 100% reliable. > It would be nice if HttpClient could detect it somehow if it is possible. It would also be great if HttpClient could walk my dog > I > think I had no such problem in HttpClient 3. Or maybe I just didn't notice > that ;-) > You did not notice. This is what I recommend you do: close idle connections more aggressively, for instance, after 5 seconds of inactivity. This will reduce the change of idle connections being closed on the server without the client-side noticing. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org