Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 41306 invoked from network); 8 Oct 2003 23:24:30 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 8 Oct 2003 23:24:30 -0000 Received: (qmail 50940 invoked by uid 500); 8 Oct 2003 23:24:14 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 50922 invoked by uid 500); 8 Oct 2003 23:24:14 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 50892 invoked from network); 8 Oct 2003 23:24:14 -0000 Received: from unknown (HELO mxout1.cac.washington.edu) (140.142.32.134) by daedalus.apache.org with SMTP; 8 Oct 2003 23:24:14 -0000 Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout1.cac.washington.edu (8.12.10+UW03.09/8.12.10+UW03.09) with ESMTP id h98NOKaZ005984 for ; Wed, 8 Oct 2003 16:24:20 -0700 Received: from u.washington.edu (pool-151-199-40-104.bos.east.verizon.net [151.199.40.104]) (authenticated bits=0) by smtp.washington.edu (8.12.10+UW03.09/8.12.10+UW03.09) with ESMTP id h98NOIwx003150 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT) for ; Wed, 8 Oct 2003 16:24:20 -0700 Date: Wed, 8 Oct 2003 19:24:18 -0400 Subject: Re: MultiThreadedHttpConnectionManager question Content-Type: text/plain; charset=ISO-8859-1; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Michael Becke To: "Commons HttpClient Project" Content-Transfer-Encoding: quoted-printable In-Reply-To: <00e601c38d9b$7aeb63c0$9b89a8c0@doimm> Message-Id: <89F27F57-F9E6-11D7-8337-00306557E112@u.washington.edu> X-Mailer: Apple Mail (2.552) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Andrea, The MultiThreadedHttpConnectionManager creates connections and keeps=20 them open as long as it can. The number of connections kept open can=20 be configured using setMaxConnectionsPerHost() and=20 setMaxTotalConnections(). The issue of the sockets in the CLOSE_WAIT=20 state seems to be a side effect of linux. In particular it seems to=20 keep sockets is this state even after the java.net.Socket has been=20 closed. I don't think there is much that can be done about it. Mike On Wednesday, October 8, 2003, at 08:55 AM, Andrea Fabris wrote: > Hi everyone! > I'd like to ask some question about http pool in commons-httpclient. > As i read, MultiTrheadedHttpConnectionManager is the manger=20 > responsible for > handling the connection in a multi-thread enviroment. > I want to use this to create a private HttpClient property in a = servlet > class, so each servlet thread can use a different socket to=20 > communicate with > a remote http server. > Now i monitored my enviroment to check the connection status and i=20 > found > that, when i don't use the servlet, some connection from servlet to=20 > remote > hosts remain up in CLOSE_WAIT state. > I want to ask you if this beahaviour is correct, because doing so the > manager uses machine resources even when there are no active requestes=20= > for > connection for a long time. > My enviroment is: > OS: linux redhat 8.2 with kernel 2.4.18 > JVM: 1.3.1_07-b02 > Tomcat 3.3.1 > Commons-HttpClient 2.0rc1 > > Thanx for your help > > Regards > Andrea Fabris > Sytel Reply - Italy > > > > > -- > Email.it, the professional e-mail, gratis per te: = http://www.email.it/f > > Sponsor: > Conto Arancio. Zero spese, stessa banca, pi=F9 interessi. > Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3D657&d=3D8-10 > > --------------------------------------------------------------------- > To unsubscribe, e-mail:=20 > commons-httpclient-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail:=20 > commons-httpclient-dev-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org