Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 7857 invoked from network); 14 Nov 2007 14:51:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Nov 2007 14:51:32 -0000 Received: (qmail 94138 invoked by uid 500); 14 Nov 2007 14:51:12 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 94120 invoked by uid 500); 14 Nov 2007 14:51:12 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 94109 invoked by uid 99); 14 Nov 2007 14:51:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Nov 2007 06:51:12 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Michele.Mazzucco@ncl.ac.uk designates 128.240.234.82 as permitted sender) Received: from [128.240.234.82] (HELO cheviot2.ncl.ac.uk) (128.240.234.82) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Nov 2007 14:51:15 +0000 X-Newcastle-MailScanner-Watermark: 1195656649.33768@Thh/NljBXW3M0A3hxd+pCg Received: from [10.8.150.50] (socksgw4.ncl.ac.uk [128.240.229.70]) by cheviot2.ncl.ac.uk (8.13.1/8.13.1) with ESMTP id lAEEonYY009007 for ; Wed, 14 Nov 2007 14:50:49 GMT Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: <84f31d220710080026k6c4be58o1c37fee642669cef@mail.gmail.com> <1192010069.4652.1.camel@eskdale.ncl.ac.uk> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <28639D73-96E6-4001-B169-7CE849BD7D5F@ncl.ac.uk> Content-Transfer-Encoding: quoted-printable From: Michele Mazzucco Subject: Re: Address already in use: connect Date: Wed, 14 Nov 2007 14:50:48 +0000 To: axis-user@ws.apache.org X-Mailer: Apple Mail (2.752.3) X-Newcastle-MailScanner-Information: Please contact Postmaster@newcastle.ac.uk for more information X-Newcastle-MailScanner: Found to be clean X-Newcastle-MailScanner-MCPCheck: X-Newcastle-MailScanner-From: michele.mazzucco@ncl.ac.uk X-NCL-Spam-Status: No X-Virus-Checked: Checked by ClamAV on apache.org I think that this is not solution. The problem arises because your code doesn't cleanup the used =20 resources properly. When you (re)use the same http client you can't see the problem only =20 because you're using only 1 object. Michele On 14 Nov 2007, at 14:46, P=E4r Malmqvist wrote: > Hello! > > The problem with "Address already in use: connect" exception for an =20= > Axis2 client when executing thousends of calls > is solved by: > > Options options =3D stub._getServiceClient().getOptions(); > > options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE); > > So it might be good to change the default value for =20 > HTTPConstants.REUSE_HTTP_CLIENT > to TRUE for the client generated by the wsdl2java tool. > > What do you gurus think? > > /P=E4r > > > > > > > > Subject: Re: Address already in use: connect > > From: Michele.Mazzucco@ncl.ac.uk > > To: axis-user@ws.apache.org > > Date: Wed, 10 Oct 2007 10:54:29 +0100 > > > > Try to set some custom options [1], like caching/reusing the same =20= > http > > client and throttling the max number of connections. > > > > Michele > > > > [1] > > http://svn.apache.org/viewcvs.cgi//webservices/axis2/trunk/java/=20 > modules/integration/test/org/apache/axis2/async/AsyncService2Test.java > > > > > > On Wed, 2007-10-10 at 11:13 +0200, P=E4r Malmqvist wrote: > > > Hi! > > > > > > I have written a simple blocking client using Axis2 1.3 API's. > > > > > > When I do like this: > > > > > > for(int i =3D 0; i < 1000000; i++) { > > > ... > > > ServiceClient sender =3D new ServiceClient(); > > > sender.sendReceive(payload); > > > ... > > > } > > > > > > there is no problem. The client runs for many hours. > > > > > > > > > > > > When I do like this: > > > > > > ServiceClient sender =3D new ServiceClient(); > > > > > > for(int i =3D 0; i < 1000000; i++) { > > > ... > > > sender.sendReceive(payload); > > > .... > > > sender.cleanup(); > > > sender.cleanupTransport(); > > > > > > } > > > > > > I get exception ....AxisFault: Address already in use: connect > > > after a couple of thousand calls. > > > > > > It seems to be something wrong in the ServiceClient class which > > > shows up after a while. > > > Any ideas? > > > > > > /P=E4r Malmqvist > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > =20 > ______________________________________________________________________ > > > Explore the seven wonders of the world Learn more! > > > > > > =20 > --------------------------------------------------------------------- > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > > For additional commands, e-mail: axis-user-help@ws.apache.org > > > > > Get news, entertainment and everything you care about at Live.com. =20 > Check it out! --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org