Return-Path: Delivered-To: apmail-jakarta-httpclient-dev-archive@www.apache.org Received: (qmail 92137 invoked from network); 13 Jan 2005 21:21:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 Jan 2005 21:21:27 -0000 Received: (qmail 10438 invoked by uid 500); 13 Jan 2005 21:21:26 -0000 Delivered-To: apmail-jakarta-httpclient-dev-archive@jakarta.apache.org Received: (qmail 10410 invoked by uid 500); 13 Jan 2005 21:21:26 -0000 Mailing-List: contact httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "HttpClient Project" Reply-To: "HttpClient Project" Delivered-To: mailing list httpclient-dev@jakarta.apache.org Received: (qmail 10393 invoked by uid 99); 13 Jan 2005 21:21:25 -0000 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from mail13.bluewin.ch (HELO mail13.bluewin.ch) (195.186.18.62) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 13 Jan 2005 13:21:24 -0800 Received: from xbox.localdomain (81.63.105.29) by mail13.bluewin.ch (Bluewin AG 7.0.035) id 41DEA25F0008D3E5 for httpclient-dev@jakarta.apache.org; Thu, 13 Jan 2005 21:21:21 +0000 Received: from 192.168.0.4 (unknown [192.168.0.4]) by xbox.localdomain (Postfix) with ESMTP id E4DF8B6EC6 for ; Thu, 13 Jan 2005 22:21:41 +0100 (CET) Subject: RE: HttpClient Stop the connection but release connection uncertain From: Oleg Kalnichevski To: HttpClient Project In-Reply-To: References: Content-Type: text/plain; charset=ISO-8859-1 Date: Thu, 13 Jan 2005 22:21:20 +0100 Message-Id: <1105651280.9544.7.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Wed, 2005-01-12 at 10:46 +0100, jrlecq@easyvoyage.fr wrote: > I m using your MultiThreadedHttpConnectionManager with satifaction :-) > > >What do you mean by "really released"? Closed? > > Yes "closed" and httpClient really free to be catch be the garbageCollector. > I could do "HttpClientObject=null;" but sometimes I need to reuse it. So I > use the method "HttpMethodeBase.releaseConnection()". > Jeanremi, There are other options (1) You may want to implement a custom connection manager that force- closes connections upon release in the HttpConnectionManager#releaseConnection method. (2) This option is available in HttpClient 2.0 as of release 2.0.1. When you are done using HttpClient, call the shutdown method of the MultiThreadedHttpConnectionManager: http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.html#shutdown() Hope this helps Oleg > I think that I need the action of the method give in HttpClient3.0beta > "HttpMethodeBase.abort()" (I think anderstand that this one close the > connection directly on the level of the socket). But I do not want to use > beta version in my production version... > > jeanremi > -----Message d'origine----- > De : Oleg Kalnichevski [mailto:olegk@apache.org] > Envoy� : mardi 11 janvier 2005 22:52 > � : HttpClient Project > Objet : Re: HttpClient Stop the connection but release connection > uncertain > > > On Tue, 2005-01-11 at 16:20 +0100, jrlecq@easyvoyage.fr wrote: > > Hi, > > > > I use HttpClient2.0 in an application used to connect to several > > webservices. > > > > But, I meet a memory leak because connections create by the HttpClient's > > objects seem to be not releasy correctly. I read in the API that the > > HttpMethodeBase.releaseConnection() "NOT close the connection if it can be > > reused". > > > > So how can I be certain that the current httpClient and its connection is > > really released ? > > > > Jeanremi, > > What do you mean by "really released"? Closed? > > What connection manager are you using? Do you re-use HttpClient instance > or always create a new one per each request? > > Oleg > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org