如何知道 Tomcat 中的线程被杀死的原因是什么?
在我们的Confluence服务器(基于tomcat 9)中,我们将interruptThreshold添加到30分钟以杀死长时间运行的线程(通常这些是卡住的线程)。
然而,某些线程的中断并不成功(这没关系,正如文档中提到的那样,它并非在所有情况下都有效),但这些特定线程会在 8 小时后被杀死。
这些特定的线程与自定义插件相关,我们的开发人员说他们在任何地方都没有这样的 8 小时设置,我在 tomcat 或 confluence 中找不到任何内容。
我们将能够复制卡住的线程,但如何找出 8 小时后杀死它们的原因呢?
In our confluence server (tomcat 9 based), we added interruptThreshold to 30mins to kill long running threads (usually these are stuck threads).
However, interrupts for certain threads are not succesful (and it is okay, as it's mentioned in documentation that it doesn't work in all cases), but these specific threads gets killed after 8 hours.
These specific threads are related to a custom plugin and our developers say they don't have such 8 hours setting anywhere and I couldn't find anything in tomcat or in confluence.
We will be able to replicate the stuck threads, but how to findout what's killing them after 8 hours?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Tomcat 上的此类操作应记录在 {CONFLUENCE_HOME}/{DATA_FOLDER}/logs 文件夹中,请找到这些日志文件并查找此操作/时间戳。
如果由于某种原因,日志没有完全反映,您可以按照如下所述进行设置
https://confluence.atlassian.com/doc/configuring-logging-181535215。 html。
另外,您可以在运行 start.bin/start.sh 时在 -X... Java / Tomcat 语句中控制 logng。
Such actions on Tomcat should be logged in the {CONFLUENCE_HOME}/{DATA_FOLDER}/logs folder, please find these logs files and look for this operation/timestamp.
If for some reason, logs are not fully reflected, you can set it as described in
https://confluence.atlassian.com/doc/configuring-logging-181535215.html.
Also, you can control loggng in -X... Java / Tomcat statements when running start.bin/start.sh.