David,
please see my comments below.
On 25 Apr 2007, at 18:33, david2 wrote:
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
Can you please post the full stack trace?
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?
Yes, probably.
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.
It looks like providing a custom configuration context is a bit messy ;)
Can you log a JIRA (with as many info as you can) please?
See also https://issues.apache.org/jira/browse/AXIS2-2581. It looks a
bit different (see the cause) but has the same effect.
By the way, what performance level (requests per second) do you
typically
see for a web service running on a single node?
It depends on several things such as service type (long or short?, i/
o or cpu bound?, etc), the server you're using, wether the client and
the server are on the same sub-net or they are spread across the
Internet, etc.
-David
Michele
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]