axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Theazyfa Jak <theaz...@hotmail.com>
Subject RE: AW: client slow after sometime.
Date Thu, 02 Jun 2011 06:37:32 GMT

Thanks for your answer Josef!

I already take the 2 time ( and I forgot to talk about ^^ sorry)

So, I always have the same time for the Server Process.
But this time is only about the 'created' code. So, I can't really know if it's the server
'wrapped' part ( connection pool,....) is slowing or if it's the client.

Wireshark is a very good ( and fast ) idea to found the guilty !
I do the test and I come to you with result.

Thanks to give me a new approach!

Regards,
Subject: AW: client slow after sometime.
Date: Wed, 1 Jun 2011 18:55:39 +0200
From: josef.stadelmann@axa-winterthur.ch
To: java-user@axis.apache.org



It would be nice if you can find out the following:Is the delay cause by the network or the
server processing your request? For that you can get the system time in as small a fraction
as possible, i.e. nano seconds 1.       At the server take the system time up on entering
the service and just before you return the response.2.       add this two entries to the response.3.
      At the client calculate the delta 4.       This is the servers true processing time
1.       At the client side you get the system time just before you send the message and 2.
      you catch the time when the response is back.3.       Then you calculate the client-side-delta.
4.       This is the total turn-around-time.  Now then you shall report to use what you observer
in the beginning and after 2/3 hours. Basically which time increases a lot?a)      Just the
server timeb)      Just  the turnaround time at the clientc)       Both? Maybe you can observer
that after 2/3 hours the server uses much more time to process your request? 
Then you know where you have to investigate more closer. Maybe after 2/3 hours you will find
that the servers process time is still the same but that  the time the request/response is
on the way to/from the server takes much more time.In this case it could be good to use a
network analyzer such as Wireshark to find the cause. Is it the send or the receive time when
you look from the client side. And then you can also calibrate and profile your server and
your client using NetBeans IDE and use all about  PROFILING what help of NetBeans tells you
to do..This would be the most professional approach. You will end up either with a network
latency time increase for sending or receiving or both Or you will find either a CPU or MEMORY
or IO Bottleneck at the Client or the Server side. Hope this helps to start with your not
so easy task And only if you have found the location/the cause you can think about a configuration
change!Josef    Von: Theazyfa Jak [mailto:theazyfa@hotmail.com] 
Gesendet: Mittwoch, 1. Juni 2011 10:49
An: java-user@axis.apache.org
Betreff: client slow after sometime. Hello, 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,
httpClient); 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? Regards, 
 		 	   		  
Mime
View raw message