Optimizing Axis Web Service Performance Part 1
Written on 4:51 AM by ronald
I am currently working on a web application which supposedly will send out sms messages to mobile phones.
Basically the design goes like this
My web application will send an soap request comprising of the sms message and mobile number to web service which will in turn query the sms gateway and then response will be forwarded back to web service and finally back to the web application to verify that the sms message was sent.
Now, everything was working fine if i am only calling web service one at a time
If i start to make concurrent requests to the web service.
I will encounter errors like Socket Read Timout exceptions, Connection Timout exceptions
Why is this so? After spending alot of time googling, i realize that apache axis actually opens up a new socket connection for every web service call invoked.
There is a limit to the incoming and outgoing connections at the server that is hosting the web service.
So what is the work around or solution for this?
1. Increase the _call.setTimeout(new Integer( 4 * 60 * 1000 ));
e.g. 4 minutes
2. Adjust the TCP connections in the server
e.g. increase number of connection requests and adjust the tcp timeout for each connection to be lower
I will try to explain how to optimize using these two solution in part 2.
