axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Theazyfa Jak <>
Subject client slow after sometime.
Date Wed, 01 Jun 2011 08:48:43 GMT

First of all, sorry for my english.
I have a strange issue in my apps and I really don't know how to fix it.
I have a app that called a Webservice (Websphere 6.2).The client code is generated by Axis
1.4.1 (Java SE 6).
when I start the apps, I have a response time under 50 ms and all is fine.
After sometime ( generally 2/3hours ) the response time increase to 350/400 ms and the only
workaround I found is to stop/start the client app.
the first version of my code was basically : 
xxxStub ws = new xxxStub("EPR");ws.getMethod();
So I recreate everything each time and I have a response time between 30 to 100ms.And after
2/3 hours I got 250/300.
So I try to use a MultiThreadedHttpConnectionManager. I Create a singleton to call the Webservice
and in my constructor I put this : 
	private static final int connectionPerHost = 10;	private static final int DEFAULT_MAX_TOTAL_CONNECTIONS
= 50;	private static final int timeoutIdleconnection = 20000;
	....	Constructor(){			....			conf = new PropertiesConfiguration(Constante.CONFIG_NAME);	
	epr = conf.getString(Constante.EPR_ADDRESS_EMISSION);			ws = new xxxStub(epr);			ws._getServiceClient().getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
Constants.VALUE_TRUE);			MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
		connectionManager.getParams().setMaxTotalConnections(DEFAULT_MAX_TOTAL_CONNECTIONS);			connectionManager.getParams().setDefaultMaxConnectionsPerHost(connectionPerHost);
		connectionManager.closeIdleConnections(timeoutIdleconnection);			HttpClient httpClient =
new HttpClient(connectionManager);			ws._getServiceClient().getOptions().setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
and after each call, I made a ws._getServiceClient().cleanupTransport().I have better response
time (15-40 ms) but I always have after 2/3hours a inscrease to 300 ms....

So, I have 3 questions : 1- Is my implementation of MultiThreadedHttpConnectionManager correct?2-
Is my problem due to client or Server settings?3- Any ideas of how to fix this?

View raw message