Weblogic9.2 Stuck Thread Max Time

在WEBLOGIC中如果一个线程执行时间超过了Stuck Thread Max Time规定的时间,

WEBLOGIC会把它认为是STUCK线程,并记录在日志中。

 

我们也可以通过'Dump Thread Stacks' 来捕获STUCK状态的进程。

Home > Summary of Servers > AdminServer>Monitoring>Performance>'Dump Thread Stacks'

 但并不是每次'Dump Thread Stacks' 都能捕获Stuck状态的进程。

 只有在线程执行时间超过了Stuck Thread Max Time规定的时间

 我们才有可能通过'Dump Thread Stacks' 或WEBLOGIC的日志捕获它。

 

通常我们通过'Dump Thread Stacks'能捕获到以下信息。

 

"[STUCK] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'" RUNNABLE native         

jrockit.net.SocketNativeIO.readBytesPinned(Native Method)

jrockit.net.SocketNativeIO.socketRead(SocketNativeIO.java:32)

java.net.SocketInputStream.socketRead0(SocketInputStream.java)

java.net.SocketInputStream.read(SocketInputStream.java:129)

java.io.BufferedInputStream.fill(BufferedInputStream.java:218)

java.io.BufferedInputStream.read1(BufferedInputStream.java:256)

java.io.BufferedInputStream.read(BufferedInputStream.java:313)

com.informix.asf.IfxDataInputStream.readFully(IfxDataInputStream.java:146)

com.informix.asf.IfxDataInputStream.readSmallInt(IfxDataInputStream.java:453)

 

在WEBLOGIC的日志中我们能看到如下信息:

<2010-11-8 下午02时38分28秒 CST> <Error> <WebLogicServer> <BEA-000337> <[STUCK]
 ExecuteThread: '189' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "115" seconds
 working on the request "Http Request: /prpall/business/selectPolicy.do", which is more than the configured
 time (StuckThreadMaxTime) of "30" seconds. Stack trace:
        java.net.SocketInputStream.socketRead0(Native Method)
        java.net.SocketInputStream.read(SocketInputStream.java:129)
        java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
        java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
        java.io.BufferedInputStream.read(BufferedInputStream.java:313)
        com.informix.asf.IfxDataInputStream.readFully(IfxDataInputStream.java:146)
        com.informix.asf.IfxDataInputStream.readSmallInt(IfxDataInputStream.java:453)
        com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2495)
        com.informix.jdbc.IfxSqli.a(IfxSqli.java:1752)
        com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1704)
        com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1635)
        com.informix.jdbc.IfxResultSet.a(IfxResultSet.java:206)
        com.informix.jdbc.IfxStatement.executeQueryImpl(IfxStatement.java:1229)
        com.informix.jdbc.IfxPreparedStatement.executeQuery(IfxPreparedStatement.java:376)
        weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:100)

 

 

在压力测试阶段为了捕获执行时间长的进程我们可以调整

weblogic中的Stuck Thread Max Time 为一个较小的值。

来捕获并发测试时stuck状态的进程。比如30秒。

通常在产品环境中设置此参数值为600秒。

Home > Summary of Servers > AdminServer  >Tuning >Stuck Thread Max Time

 

以下是weblogic的联机文档中对Stuck Thread Max Time 的解释

 

 

The number of seconds that a thread must be continually working before this server considers the thread stuck.

For example, if you set this to 600 seconds, WebLogic Server considers a thread to be "stuck" after 600 seconds of continuous use.

In Web Logic Server 9.x and later, it is recommended that you use the ServerFailureTriggerMBean in the OverloadProtectionMBean. The ServerFailureTriggerMBean transitions the server to a FAILED state after the specified number of stuck threads are detected. The OverloadProtectionMBean has options to suspend or shutdown a failed server.

MBean Attribute:
ServerMBean.StuckThreadMaxTime

Minimum value: 0

Maximum value: 2147483647

Changes take effect after you redeploy the module or restart the server.

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值