gpt4 book ai didi

java - Tomcat maxThreads 立即达到 : what is using these threads from the thread pool

转载 作者:行者123 更新时间:2023-11-28 23:40:06 26 4
gpt4 key购买 nike

我们的情况是 currentThreadCount 和 currentThreadsBusy 稳定在 90 左右。然后急剧增加直到 maxThreads (200) 发生,这基本上使系统对新请求无用。问题:如何查看正在使用线程的对象?基本上什么类正在使用线程。是否也可以回顾一下?


注意潜在问题:并且可以排除攻击。还有其他建议可能会发生什么

  • 由于某些原因,DB 可能不会释放线程
  • 很少使用的功能可能会失控,产生无穷无尽的请求

另请注意,问题会在大约 20 分钟后消失,顺便说一下,这是 session 超时。

最佳答案

如果您的 Tomcat 在 Linux 服务器下运行,您可以使用命令 kill -3 [您的 webapp 的 pid] 检查所有正在运行的线程,具体取决于您的 webapp。它会将所有当前线程及其状态(以及它们挂起的位置)转储到您的 web 应用程序的 catalina.out 中。

关于java - Tomcat maxThreads 立即达到 : what is using these threads from the thread pool,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20518294/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com