On Fri, 2007-03-30 at 13:13 +0200, [EMAIL PROTECTED] wrote: > Axis2 crashed means: Axis stub throws finally an exception after three > retries of httpclient and stops execution -> no more Axis stub calls. There > is no out of memory printed in console. > > Please could you run my posted clientcode at your machine and tell me,
Where is the code (TestStub, service, etc.)? > if the BindException is appearing there, too. I had to wait about 3700-4000 > calls. > I'm using no stubs (i.e. raw xml) and I get an out of memory error after 4/5000 messages (this happens in about 1 hour, so I guess the client is quite loaded), but no network issues. Michele > Thanks! > > > -------- Original-Nachricht -------- > Datum: Fri, 30 Mar 2007 11:35:08 +0100 > Von: Michele Mazzucco <[EMAIL PROTECTED]> > An: [email protected] > Betreff: Re: java.net.BindException > > > > > > > On Fri, 2007-03-30 at 12:04 +0200, [EMAIL PROTECTED] wrote: > > > Michele, > > > > > > I could reproduce this behaviour even with a single thread inside a > > loop. After 4000 calls, Axis2 crashed. > > > > What do you mean when you say "axis2 crashed"? The exception below it's > > not a crash. Instead, there's a know issue (see JIRA 2328) which causes > > an OutOfMemory error because of a memory leak in the connection > > listener. > > > > > > > > By the way, how can I stop local listener? > > > > Please see here > > http://www.nabble.com/-Axis2--ServiceClient-question-tf2496516.html#a6959251 > > > > Michele > > > > > I think this might be a security risk (if not needed). > > > > > > My sample code: > > > > > > ConfigurationContext configurationContext = > > ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, > > null); > > > HttpClient httpClient = new HttpClient(new > > MultiThreadedHttpConnectionManager()); > > > > > > configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, > > > > > Boolean.TRUE); > > configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, > > > httpClient); > > > TestStub stub = new TestStub(configurationContext, SVC_URL); > > > Data param = new Data(); > > > param.setData(getData()); > > > > > > try { > > > for (int i = 0; i < 10000; i++) { > > > stub.call(param); > > > > > > if (i % 100 == 0) { > > > System.out.println(i); > > > } > > > } > > > } catch (Exception e) { > > > e.printStackTrace(); > > > } finally { > > > stub.cleanup(); > > > } > > > > > > > > > Console: > > > > > > ... > > > 3600 > > > 3700 > > > 3800 > > > 3900 > > > 4000 > > > 30.03.2007 12:00:54 org.apache.commons.httpclient.HttpMethodDirector > > executeWithRetry > > > INFO: I/O exception (java.net.BindException) caught when processing > > request: Address already in use: connect > > > 30.03.2007 12:00:54 org.apache.commons.httpclient.HttpMethodDirector > > executeWithRetry > > > INFO: Retrying request > > > ... > > > > > > > > > -------- Original-Nachricht -------- > > > Datum: Fri, 30 Mar 2007 10:45:44 +0100 > > > Von: Michele Mazzucco <[EMAIL PROTECTED]> > > > An: [email protected] > > > Betreff: Re: java.net.BindException > > > > > > > Christoph, > > > > > > > > on the client start a local http server is started to receive the > > > > response. > > > > Do you use the same ServiceClient to send your requests? What about > > the > > > > ConfigurationContext? Do you clean up the ServiceClient(s) when you > > are > > > > done? Finally remember that if you are using a custom > > > > ConfigurationContext you have to manually close the connection > > listener > > > > (it's cleaned only if you use the default ConfigurationContext). > > > > > > > > configurationContext.getListenerManager ().stop(); > > > > > > > > Be careful because there's only one connection listener for each > > > > ConfigurationContext. > > > > > > > > Michele > > > > > > > > On Fri, 2007-03-30 at 10:52 +0200, [EMAIL PROTECTED] wrote: > > > > > Thanks for response. Your suggested solution does not work. After > > > > thousands of calls the Bind exception appears again. Then I have to > > wait a little > > > > (even with JVM restart) for next successful runs. > > > > > I think, that socket handling of HttpClient is the problem. No local > > > > server is started. > > > > > Please could you investigate this problem. I feel very uncomfortable > > > > about this behaviour, which might just raise in production under heavy > > load. > > > > > > > > > > I have created a JIRA issue. > > > > > > > > > > Christoph > > > > > > > > > > I guess the reason is explained here http://wso2.org/library/165 > > > > > Something like this should solve the problem > > > > > > > > > > ConfigurationContext configurationContext = > > ConfigurationContextFactory > > > > > .createConfigurationContextFromFileSystem(null, > > > > > null); > > > > > > > > > > HttpClient httpClient = new HttpClient( > > > > > new MultiThreadedHttpConnectionManager()); > > > > > > > > > > > > > > > configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, > > > > > Boolean.TRUE); > > > > > configurationContext > > > > > .setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient); > > > > > > > > > > > > > > > Michele > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
