0

我面临一个问题,即 WAS 线程挂起。

配置:

操作系统:AIX,

是:6.1.0.31

com.ibm.websphere.threadmonitor.interval:180 秒

com.ibm.websphere.threadmonitor.threshold:10 分钟

com.ibm.websphere.threadmonitor.false.alarm.threshold:100

以上设置用于挂起检测。

有什么办法可以清理挂起的线程吗?

提前致谢。

4

3 回答 3

0

你有解释的工具。我还没有在生产中使用它(从来没有这个要求,我们去重新启动)。不过,您可以检查一下。它使用字节码检测。

http://www.ibm.com/developerworks/websphere/downloads/hungthread.html

于 2014-02-15T18:42:49.983 回答
0

No. WAS doesn't provide mechanism for that. What you see is a watchdog mechanism that provides merely notifications. You are supposed to actually fix the underlying problem why the threads get hung in the first place. To get started with that issue

kill -3 <pid>

and read the stack traces. It is likely that after a few you will start seeing a pattern and then you have to read the source code for your applications to understand what really went wrong and how to fix it.

于 2011-09-18T08:56:45.617 回答
0

据我所知,Java 不允许杀死挂起的线程。最好的办法是通过寻找原因来避免挂起线程。就像其他答案中已经提到的那样,尝试强制应用程序服务器创建线程转储(又名 Java Core)并分析其内容。在 Linux/UNIX 系统上

kill -3 <pid>

将完成这项工作。您可以在 Internet 上找到免费的图形工具来查看这些转储。我通常使用一种称为IBM Thread and Monitor Dump Analyzer for Java 的工具。WebSphere Application Server 日志文件将告诉您要查找的线程名称。

于 2012-02-24T19:28:14.647 回答