java axisclient超时,Axis2 Java Web服务客户端超时后导致的问题

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 exception 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
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值