开发者

Problems caused by Axis2 java web service client after a timeout

I have the following issue:

- A java web application that generate Voice XML - based on struts - deployed on IBM WebSphere AS (WAS v.7.0.0.7).

- The application uses Axis2 java - v.1.5 - web service client to invoke a web service resides on WebLogic AS.

- I set the timeout to 1000 ms using :

stub.getServiceClient().getOptions().setTimeOutInMilliSeconds(1000);

- The maximum number of times the application hits the web service is about 25,000 per hour - about 7 concurrent calls.

- After putting the code that invoke the web service in a try-catch block, i catch the e开发者_开发知识库xception and return from the method.

- 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

exception.getMessage();

I get either one of the following, mostly the first:

org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 60000 ms

or

  org.apache.axis2.AxisFault: Read timed out

- 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.

- 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.

- 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"?

I apologize for the long description/question, I always appreciate your help!


From what I understand, the tineout error is being reported from the Server as 60000ms. Coincidentally, this 60 seconds is the default timout for the IBM IHS server so your issue could well be with that.

Assuming that you want your requests to take longer than 60 seconds to process on the server you can increase this timeout by editing /opt/WebSphere70/Plugin/config/SERVERNAME/plugin-cfg.xml

Look for ServerIOTimeout="60" and change the value to greater than 60 seconds.

[edit]

You can view this setting via the Admin console as well...

Servers > Web servers > SERVERNAME > Plug-in properties

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜