axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajesh (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AXIS2-5768) Axis2 (1.4.1) Client Connection Issue
Date Mon, 02 May 2016 13:44:13 GMT
Rajesh created AXIS2-5768:
-----------------------------

             Summary: Axis2 (1.4.1) Client Connection Issue
                 Key: AXIS2-5768
                 URL: https://issues.apache.org/jira/browse/AXIS2-5768
             Project: Axis2
          Issue Type: Bug
          Components: transports
            Reporter: Rajesh


I have a java(axis2 1.4.1 client) component in middleware which consumes a web service hosted
in another application. Am facing some issues in it. 

Please find the code snippet below 
ConfigurationContext configContxt; 
MultiThreadedHttpConnectionManager connxMgr = new MultiThreadedHttpConnectionManager(); 
HttpConnectionManagerParams params = connxMgr.getParams(); 
params.setDefaultMaxConnectionsPerHost(50); 
params.setMaxTotalConnections(50); 
connxMgr .setParams(params); 
HttpClient client = new HttpClient(connxMgr); 
configContxt.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, "True"); 


Please help to clarify the below queries, 

1. Whenever a new request comes in, a new connection is getting created. This can be confirmed
by doing 'netstat -a|grep <<provider URI>>' 

When we were using axis2 1.3v client earlier there was no new connection created, please clarify
why this is creating a new connection while using axis2 1.4.1? 

To prevent this, I have set REUSE_HTTP_CLIENT property in ConfigurationContext to TRUE. So
this will reuse the existing (already established) connection to the server. 


2. I have set the setDefaultMaxConnectionsPerHost and setMaxTotalConnections as 50. When I
do the load test from SoapUI by triggering 50 requests, only 3 connections were created. Later
I increased to 200 requests, but still the connections count didnt exceed 3. 

Am not sure why it is not able to serve with only one connection (since reuse property is
used) and also why the number of connections did not gradually increase with the number of
requests (3 connx for 50 requests and again same 3 connx for 200 requests) 

How will the reuse propery (HTTPConstants.REUSE_HTTP_CLIENT) behave ? 

3. How many transactions can be done per connection concurrently while using " REUSE_HTTP_CLIENT
property" in the code? 

4. Another Issue is: 
I have set the closeIdleConnections with the timeout of 30 secs. 
httpClient.getHttpConnectionManager().closeIdleConnections(30000); 

Even this is not working. The unused connections are closed only after 5 mins. 
I just want to know If there could be some property set at server side which overriding this
30 seconds which am setting at client side ? 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message