Michele,

I have been trying to get your recommended code to work, but my web service
also throws an Axis Fault right at the 4000th web service request:

     Exception in thread "main" org.apache.axis2.AxisFault: Address already
in use: connect

I ran netstat and noticed that I have over 1400 connections in a TIME_WAIT
state.  If I add a breakpoint in the debugger right before sending the
message, the problem does not appear to manifest itself for every message
sent.  Are these piling up resulting in the AxisFault?

Here is the code I am using to create, initialize, and run the stub:

        HttpConnectionManagerParams connectionManagerParams = new
HttpConnectionManagerParams();
        connectionManagerParams.setTcpNoDelay(true);
        connectionManagerParams.setStaleCheckingEnabled(true);
                        
        MultiThreadedHttpConnectionManager connectionManager = new
MultiThreadedHttpConnectionManager();
        connectionManager.setParams(connectionManagerParams);
        HttpClient httpClient = new HttpClient(connectionManager);
                        
        ConfigurationContext configurationContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
null);
        configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
Boolean.TRUE);
        configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
httpClient);
                        
        stub = new MyServiceStub(configurationContext, target);
        
        boolean success = true;

        while(success) {
                success = stub.performService(records);
                stub.cleanup();
                //  System.gc();
        }

Note the commented out "System.gc()".  If I uncomment this line of code, the
code runs much slower (alas, unacceptably slow), but does not appear to ever
generate the "Address already in use: connect" AxisFault.  Indeed, I am past
24,000 requests now and have not encountered a single AxisFault.  Also,
there are less than 400 TIME_WAIT connections.  However, I am only getting
about 10 requests per second throughput--much too slow.  I have been able to
get as many as 500 requests per second in the past.

By the way, what performance level (requests per second) do you typically
see for a web service running on a single node?

-David
-- 
View this message in context: 
http://www.nabble.com/BindException-in-axis-client-tf3632035.html#a10185772
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to