Axis2 Java Web服务客户端超时后导致的问题 [英] Problems caused by Axis2 java web service client after a timeout

查看:339
本文介绍了Axis2 Java Web服务客户端超时后导致的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到以下问题:
-一个基于Struts生成Voice XML的Java Web应用程序,部署在IBM WebSphere AS(WAS v.7.0.0.7)上.
-该应用程序使用Axis2 java-v.1.5-Web服务客户端来调用WebLogic AS上驻留的Web服务.
-我使用以下命令将超时设置为1000毫秒:

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);


-应用程序访问Web服务的最大次数约为每小时25,000次-大约有7个并发呼叫.
-将调用Web服务的代码放在try-catch块中之后,我捕获了异常并从方法中返回.
-由于打开连接或读取Web服务调用结果中的计时器到期,因此每小时平均会在WAS上引发大约200个异常 -通过登录


- 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

  org.apache.axis2.AxisFault: Read timed out


-问题是过一会儿,应用程序服务器挂起,不响应传入的请求,或者过了一会儿才响应,这使我们重新启动了应用程序服务器,它在10天内发生了3次.
-查看日志,除了由于超时到期而捕获的异常外,我什么也没发现,也许还有更多的东西,但是我还没有找到.


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

推荐答案

据我了解,从服务器报告的tineout错误为60000ms.巧合的是,这60秒是IBM IHS服务器的默认超时,因此您的问题很可能就是这个.

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.

假设您希望在服务器上处理请求的时间超过60秒,则可以通过编辑/opt/WebSphere70/Plugin/config/SERVERNAME/plugin-cfg.xml来增加此超时时间

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

查找ServerIOTimeout ="60"并将其值更改为大于60秒.

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

您也可以通过管理控制台查看此设置...

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

服务器> Web服务器> SERVERNAME>插件属性

Servers > Web servers > SERVERNAME > Plug-in properties

这篇关于Axis2 Java Web服务客户端超时后导致的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆