WebLogic卡住线程保护 [英] WebLogic stuck thread protection

查看:398
本文介绍了WebLogic卡住线程保护的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,WebLogic在15分钟(600秒)后杀死卡住的线程,这由 StuckThreadMaxTime 参数控制。但是,我找不到有关如何定义卡住的更多细节。具体来说:

By default WebLogic kills stuck threads after 15 min (600 s), this is controlled by StuckThreadMaxTime parameter. However, I cannot find more details on how exactly "stuckness" is defined. Specifically:


  • 15分钟倒计时的开始点是多少。请求处理开始?最后 wait() -like方法?还有别的吗?

  • 这是否只适用于请求处理线程或所有线程?即请求处理线程可以通过为长任务生成工作线程来逃避这种保护吗?特别是,它可以在没有15分钟倒计时的情况下将响应写入这样的工作人员吗?

  • What is the point at which 15 min countdown begins. Request processing start? Last wait()-like method? Something else?
  • Does this apply only to request-processing threads or to all threads? I.e. can a request-processing thread "escape" this protection by spawning a worker thread for a long task? Especially, can it delegate response writing to such a worker without 15 min countdown?

我的用例是通过权限系统下载大文件。由于用户需要进行身份验证并具有查看文件的权限,因此我无法(或至少不知道如何)将其留给简单的HTTP服务器,例如Apache的。而且由于文件可能很大,下载(至少在理论上)可能需要超过15分钟。

My usecase is download of huge files through a permission system. Since a user needs to be authenticated and have permissions to view a file, I cannot (or at least don't know how) leave this to a simple HTTP server, e.g. Apache. And because files can be huge, download could (at least in theory) take more than 15 minutes.

推荐答案

Weblogic确实 StuckThreadMaxTime 之后杀死卡住的线程。它不能这样做,消息只是一个状态信息,所以你(即管理员)知道线程已经超过10分钟(600秒= 10分钟,而不是15分钟)

Weblogic does NOT kill stuck threads after the StuckThreadMaxTime. It cannot do so, the message is only a status info so that you (i.e. admin) is aware that the thread has crossed 10 mins (600 sec = 10 min, not 15)

这是一个可配置的值。

当线程开始在服务器内处理请求时,计时器启动。线程不会被杀死,但实际上会继续处理,直到操作结束。所以在你的情况下,你不需要担心线程被杀死,它只是告诉你所花费的时间 - 你知道在这个用例中。

The timer starts when the thread begins processing the request within the server. The thread will not be killed but will actually go on processing until the operation is over. so in your case, you do not need to worry about the thread getting killed, it has just informed you about the time taken - which you are aware of in this use case.

它适用于所有线程AFAIK - 任何衍生线程也将按照相同的规则运行。

It applies to all threads AFAIK - any spawned thread will also operate under the same rules.

恕我直言,Weblogic(或任何应用服务器)不是存储的地方并提供大文件。这理想地适用于Web服务器层 - 我们使用可以运行文件下载servlet的SunOne。在您的情况下,您需要Tomcat以及您的Apache来优化它。

IMHO, Weblogic (or any app server) is not the place to store and serve large files. This is ideally meant for the Web server tier - we use SunOne on which the file download servlet can be run. In your case, you would need Tomcat along with your Apache for optimizing this.

这篇关于WebLogic卡住线程保护的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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