title: Problems caused by Axis2 java web service client after a timeout
body: <p>I have the following issue:<br/>
  - A java web application that generate Voice XML - based on struts - deployed on IBM WebSphere AS (WAS v.7.0.0.7).
  <br/>- The application uses Axis2 java - v.1.5 - web service client to invoke a web service resides on WebLogic AS.
  <br/>- I set the timeout to 1000 ms using :</p>
  
  <pre><code>stub.getServiceClient().getOptions().setTimeOutInMilliSeconds(1000);
  </code></pre>
  
  <p><br/>- The maximum number of times the application hits the web service is about 25,000 per hour - about 7 concurrent calls.
  <br/>- After putting the code that invoke the web service in a try-catch block, i catch the exception and return from the method.
  <br/>- On average, about 200 exceptions are thrown - on WAS - per hour because of the timer expire either in opening the connection or reading the result of the web service invocation
  - By logging</p>
  
  <pre><code>exception.getMessage();
  </code></pre>
  
  <p>I get either one of the following, mostly the first:</p>
  
  <pre><code>org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 60000 ms
  </code></pre>
  
  <p>or</p>
  
  <pre><code>  org.apache.axis2.AxisFault: Read timed out
  </code></pre>
  
  <p><br/>- The problem is after a while, the application server hangs, doesn't respond to incoming requests, or respond after a while,which makes us restart the application server, it happened about 3 times in 10 days.
  <br/>- Looking through the logs, I found nothing except the exceptions caught because of the expiry of the timeout, maybe there is something that says more, but i haven't found it yet.</p>
  
  <p><br/>- Are there any guiding points I should consider in the above scenario? is there a clean-up code i could write to release the connection if it wasn't? Can we determine the root cause of the problem from the above description? Is the behavior of the application server "normal"?</p>
  
  <p><br/>I apologize for the long description/question, I always appreciate your help!</p>