Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 50564 invoked from network); 5 Feb 2009 18:28:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Feb 2009 18:28:45 -0000 Received: (qmail 16481 invoked by uid 500); 5 Feb 2009 18:28:43 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 16304 invoked by uid 500); 5 Feb 2009 18:28:43 -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 16293 invoked by uid 99); 5 Feb 2009 18:28:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2009 10:28:43 -0800 X-ASF-Spam-Status: No, hits=4.0 required=10.0 tests=HTML_MESSAGE,MISSING_MID,SPF_PASS,SUBJ_ALL_CAPS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [62.81.187.139] (HELO mail.interd4u.com) (62.81.187.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2009 18:28:35 +0000 Received: (qmail 9725 invoked by uid 512); 5 Feb 2009 18:28:08 -0000 Received: from 80.25.178.93 by jupiter (envelope-from , uid 508) with qmail-scanner-1.25st (clamdscan: 0.87/1149. spamassassin: 3.1.0. Clear:RC:1(80.25.178.93):. Processed in 0.421675 secs); 05 Feb 2009 18:28:08 -0000 Received: from 93.red-80-25-178.staticip.rima-tde.net (HELO Portatil04) (joan.balaguero@grupoventus.com@80.25.178.93) by jupiter with ESMTPA; 5 Feb 2009 18:28:07 -0000 From: =?iso-8859-1?Q?Joan_Balaguer=F3?= To: "'HttpClient User Discussion'" Subject: MAX CONNECTIONS Date: Thu, 5 Feb 2009 19:28:00 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00C2_01C987C7.DC016390" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 Thread-Index: AcmHv3m+30+omJZ4Sv+QHL7MsQ2DvA== X-Qmail-Scanner-Message-ID: <12338584879229717@jupiter> X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20090205182842.EDAE77248B0@athena.apache.org> ------=_NextPart_000_00C2_01C987C7.DC016390 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, =20 I=92m testing HttpClient4, and I=92ve found the following problem. =20 I set MaxTotalConnections to Integer.MAX_VALUE: ConnManagerParams.setMaxTotalConnections(this.objHttpParams, Integer.MAX_VALUE); =20 But when I send 5 simultaneous requests, I get 2 =93maxConnections=94 = errors. The exception is: =20 org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection at org.apache.http.impl.conn.tsccm.ConnPoolByRoute.getEntryBlocking(ConnPool= ByR oute.java:353) at org.apache.http.impl.conn.tsccm.ConnPoolByRoute$1.getPoolEntry(ConnPoolBy= Rou te.java:238) at org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager$1.getConnecti= on( ThreadSafeClientConnManager.java:175) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequest= Dir ector.java:324) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient= .ja va:555) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient= .ja va:487) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient= .ja va:465) at com.vpfw.proxy.services.http.HttpService.sendRequest(HttpService.java:565= ) at com.vpfw.proxy.services.http.HttpService.connectServer(HttpService.java:3= 01) at com.vpfw.proxy.services.http.HttpService.connect(HttpService.java:259) at com.vpfw.proxy.servlet.ProxyUtils.byPass(ProxyUtils.java:216) at com.vpfw.proxy.servlet.ProxyServlet.service(ProxyServlet.java:449) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) =20 =20 If I print the =93maxConnections=94 value inside the exception (System.out.println(ConnManagerParams.getMaxTotalConnections(this.objHttp= Par ams))), I get: 2147483647. That=92s OK. =20 I suppose I=92m forgetting something. Maybe =93ConnManagerParams.setMaxConnectionsPerRoute()=94. Any help? =20 Thanks, =20 Joan. =20 =20 =20 =20 ------=_NextPart_000_00C2_01C987C7.DC016390--