Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 91DEFEBEB for ; Wed, 23 Jan 2013 11:49:39 +0000 (UTC) Received: (qmail 57120 invoked by uid 500); 23 Jan 2013 11:49:39 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 56946 invoked by uid 500); 23 Jan 2013 11:49:39 -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 56930 invoked by uid 99); 23 Jan 2013 11:49:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 11:49:38 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of daddywri@gmail.com designates 209.85.220.177 as permitted sender) Received: from [209.85.220.177] (HELO mail-vc0-f177.google.com) (209.85.220.177) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 11:49:32 +0000 Received: by mail-vc0-f177.google.com with SMTP id m18so3127916vcm.22 for ; Wed, 23 Jan 2013 03:49:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=/YDiQZqQofbJxhsHb4R/gIoqcTS8Tk5/kzIiRD1at2E=; b=emzcu2MpF79k6UP8BdXp0h46TekEMMTTZgVeCjuWPFu1cQtWkmQJ5s5iaKWuFNc1RP /m9+Zzb3bX1ZM9F6bQbRiHHflgvAbK6KifLzZFYeltj5HCDjLVCO3ROXW9iP4l7IUF9f 7Up7eqSIJToDpW/OH7VPBuymI/LWLnTWhiqWhvNLkNuKCcHYZM5HTDYeKrccQQ/im8Tt vCkxAHE57pFtDL1T4vQFKIXgP+AxOEIAkDtLIAF/TEAoCfQlWUTu/NRl3wuSBMSTaB78 2lQIZwcfRTN1AMuVbLESBve2U08OHvak5Xfb9TATKfqxSYRO4KUHW4AUTmGVTCY+rwyK bTFQ== MIME-Version: 1.0 X-Received: by 10.52.71.174 with SMTP id w14mr740968vdu.122.1358941751672; Wed, 23 Jan 2013 03:49:11 -0800 (PST) Received: by 10.58.233.243 with HTTP; Wed, 23 Jan 2013 03:49:11 -0800 (PST) In-Reply-To: <1358938578.23247.7.camel@ubuntu> References: <1358938578.23247.7.camel@ubuntu> Date: Wed, 23 Jan 2013 06:49:11 -0500 Message-ID: Subject: Re: Strange behavior - does this sound familiar to anyone? From: Karl Wright To: HttpComponents Project Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Thanks, Oleg. I was already aware of that. Architecturally it should not be possible to share HttpClient objects among threads in this situation. Karl On Wed, Jan 23, 2013 at 5:56 AM, Oleg Kalnichevski wrote: > On Tue, 2013-01-22 at 09:14 -0500, Karl Wright wrote: >> Hi all, >> >> For the ManifoldCF release, we've been having problems with our Solr >> connector, which uses Solrj which in turn uses >> HttpComponents/HttpClient to connect to Solr. >> >> The behavior we've been seeing is that when multiple document uploads >> to Solr are taking place at the same time, we see SocketExceptions >> that we shouldn't be seeing. These are of the general "broken pipe" >> variety, and seem to be consistent with someone somewhere closing a >> socket that should not be getting closed. It is furthermore not clear >> whether the problem is on the client side or on the server side. >> >> On the client side, we have a connection pool and DefaultHttpClient >> instance per thread. I've reviewed all the code we use to set up the >> DefaultHttpClient and also the SolrJ code that performs the actual >> upload. While I can see where there might be issues (such as unclosed >> connections) under some usage scenarios, not only are we avoiding any >> of these questionable usage scenarios, but also we are never sharing >> HttpClient objects among threads. This leads me to believe that the >> problem is on the server side. However, this is difficult for my >> colleagues to accept, so I wish to ask the question: is it even >> possible for HttpClient to close sockets in a cross-thread manner? >> > > Http connections created by HttpClient are not thread safe (with an > exception of #shutdown method). HttpClient takes special precautions to > make sure connections cannot end up being accessed by multiple threads. > Under normal circumstances client HTTP connection should never be used > by more than one thread. > > I am sorry I cannot be of any better help. > > Oleg > >> Also, FWIW, I believe that this issue may have been around a fairly >> long time, but has been masked by automatic retries in the past. >> >> Karl >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org >> For additional commands, e-mail: dev-help@hc.apache.org >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org > For additional commands, e-mail: dev-help@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org