Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 34880 invoked from network); 1 Apr 2011 11:44:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Apr 2011 11:44:46 -0000 Received: (qmail 60442 invoked by uid 500); 1 Apr 2011 11:44:46 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 60414 invoked by uid 500); 1 Apr 2011 11:44:46 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 60406 invoked by uid 99); 1 Apr 2011 11:44:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2011 11:44:46 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of guri.mailinglists@gmail.com designates 209.85.212.171 as permitted sender) Received: from [209.85.212.171] (HELO mail-px0-f171.google.com) (209.85.212.171) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2011 11:44:39 +0000 Received: by pxi7 with SMTP id 7so1016896pxi.30 for ; Fri, 01 Apr 2011 04:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=hFkit2SSo7E3C8Xdr+WXy8klaZ8s1HEct1ZnVORbq1s=; b=EC0YO/QUtra6dd3nbDhIjNYGrd124Wg0OQ8JL2XYh7ZbPzd6gWdi3JYpfb4cbPgesJ mLSlsuq0q9v3kkDjCC5oWCjiIWbAfrcE3JfF0BNlBDfJ8PAdPi4qQ991Z19nVlA78yFw SRC/tJO3Ykw3gt3PZQQSo61bxbmy0Vtm0N+wI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=FGyaOMq4N4Udghnu7GRoGaIav8MWZKAxqFozSi8mjfXgSS+BO5N5dLkTPsne4muPxr ++W4ghGzE4bN+PmNVVvREc+54gAROB/bxOqte0NY3IvXmmkgyRFm5Vcy24ObSC66LV38 cWkPZ2tXslesyv4cdmeiYG5k3KKix5NmWDP0g= MIME-Version: 1.0 Received: by 10.142.144.15 with SMTP id r15mr3086050wfd.439.1301658257854; Fri, 01 Apr 2011 04:44:17 -0700 (PDT) Received: by 10.142.136.19 with HTTP; Fri, 1 Apr 2011 04:44:17 -0700 (PDT) In-Reply-To: <254CD1BD17FACD458FD579572A6DF20902621BD5@CMBFISLTC10.FNFIS.COM> References: <254CD1BD17FACD458FD579572A6DF20902621A4F@CMBFISLTC10.FNFIS.COM> <254CD1BD17FACD458FD579572A6DF20902621BD5@CMBFISLTC10.FNFIS.COM> Date: Fri, 1 Apr 2011 17:14:17 +0530 Message-ID: Subject: Re: Keep alive From: Gurmeet Budhraja To: HttpClient User Discussion Content-Type: multipart/alternative; boundary=000e0cd2e44e1410be049fd9eef3 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd2e44e1410be049fd9eef3 Content-Type: text/plain; charset=ISO-8859-1 You can use IdleConnectionTimeoutThread for the same :) On Fri, Apr 1, 2011 at 12:41 AM, Vadheraju, Rajeshwar < Rajeshwar.Vadheraju@fisglobal.com> wrote: > Yes, agreed. I think it is good idea to implement "retry" and "idle > connection handler" as opposed to "keep alive strategy". > How did you implement or use idle connection thread? I am using xfire as > my soap framework which uses MultiThreadedConnectionManager internally, > not sure how to tell xfire to use or run "IdleConenction Thread"? > > -----Original Message----- > From: Joan Balaguero [mailto:joan.balaguero@grupoventus.com] > Sent: Thursday, March 31, 2011 12:50 PM > To: Vadheraju, Rajeshwar > Cc: 'HttpClient User Discussion' > Subject: RE: Keep alive > > Hi Raj, > > In my case, I'm sending requests to "problematic" servers. By > "problematic" > I mean that they're abruptly closing the http sockets. > > That's why I'm not interested in keeping alive my http connections for > so > many time, because after few seconds (~10 seconds), they will be > probably > closed on the server side. > > In addition, it's also a good idea to implement an "IdleConnection > Handler" > to manage idle connections (and, in the same method, also call to > 'closeExpiredConnections', recommendation made by Oleg to me some months > ago) and also a 'Retry' handler. > > With this combination of strategies, you will minimize connection > problems > (like a 'Connection reset'), but you don't have to expect to solve the > problems completely. Using Http protocol, you ALWAYS will lose requests > due > to connection problems. > > Regards, > Joan. > > -----Mensaje original----- > De: Vadheraju, Rajeshwar [mailto:Rajeshwar.Vadheraju@fisglobal.com] > Enviado el: jueves, 31 de marzo de 2011 18:19 > Para: HttpClient User Discussion > Asunto: RE: Keep alive > > Hi Joan, > I'm also researching on the same area. Could you please provide some > details why you are implementing keep alive strategy? > In other words, What problems prompted you to implement keep alive > strategy? If you could elaborate on your issue, I could share some of my > experience and research findings. > > Thanks, > Raj > > -----Original Message----- > From: Joan Balaguero [mailto:joan.balaguero@grupoventus.com] > Sent: Thursday, March 31, 2011 11:13 AM > To: 'HttpClient User Discussion' > Subject: Keep alive > > Hello Oleg, > > > > I've implemented a Connection Keep Alive strategy in my app, but I'm not > able to see what is the better way to check if it's working ok. Could > you > give any clue about how to do this? > > > > Thanks, > > Joan. > > _____________ > > The information contained in this message is proprietary and/or > confidential. If you are not the intended recipient, please: (i) delete > the > message and all copies; (ii) do not disclose, distribute or use the > message > in any manner; and (iii) notify the sender immediately. In addition, > please > be aware that any message addressed to our domain is subject to > archiving > and review by persons other than the intended recipient. Thank you. > _____________ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > For additional commands, e-mail: httpclient-users-help@hc.apache.org > > > _____________ > > The information contained in this message is proprietary and/or > confidential. If you are not the intended recipient, please: (i) delete the > message and all copies; (ii) do not disclose, distribute or use the message > in any manner; and (iii) notify the sender immediately. In addition, please > be aware that any message addressed to our domain is subject to archiving > and review by persons other than the intended recipient. Thank you. > _____________ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > For additional commands, e-mail: httpclient-users-help@hc.apache.org > > --000e0cd2e44e1410be049fd9eef3--