简体   繁体   English

Axis2 java web 服务客户端超时后导致的问题

[英]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). - 生成语音 XML 的 java web 应用程序 - 基于支柱 - 部署在 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. - 应用程序使用 Axis2 java - v.1.5 - web 服务客户端调用驻留在 WebLogic AS 上的 web 服务。
- I set the timeout to 1000 ms using: - 我使用以下方法将超时设置为 1000 毫秒:

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. - 应用程序访问 web 服务的最大次数约为每小时 25,000 次 - 约 7 个并发调用。
- After putting the code that invoke the web service in a try-catch block, i catch the exception and return from the method. - 将调用 web 服务的代码放入 try-catch 块中后,我捕获异常并从该方法返回。
- 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 - 平均而言,由于计时器在打开连接或读取 web 服务调用的结果时到期 - 在 WAS 上 - 每小时引发大约 200 个异常 - 通过记录

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. - 问题是一段时间后,应用服务器挂起,没有响应传入的请求,或者过了一会儿才响应,这使得我们重新启动应用服务器,在 10 天内发生了大约 3 次。
- 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.据我了解,服务器报告的 tineout 错误为 60000 毫秒。 Coincidentally, this 60 seconds is the default timout for the IBM IHS server so your issue could well be with that.巧合的是,这 60 秒是 IBM IHS 服务器的默认超时,因此您的问题很可能与此有关。

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

Look for ServerIOTimeout="60" and change the value to greater than 60 seconds.查找 ServerIOTimeout="60" 并将值更改为大于 60 秒。

[edit] [编辑]

You can view this setting via the Admin console as well...您也可以通过管理控制台查看此设置...

Servers > Web servers > SERVERNAME > Plug-in properties服务器 > Web 服务器 > SERVERNAME > 插件属性

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM