gpt4 book ai didi

tomcat - 分析tomcat中CPU占用率过高

转载 作者:行者123 更新时间:2023-11-28 21:49:46 25 4
gpt4 key购买 nike

我有一个运行在三台 tomcat 服务器上的生产系统。突然,我的一个 tomcat 服务器显示 100% 的 CPU 使用率,这是我从池中取出的。

任何人都可以指导我如何开始调试这个问题吗?任何工具/实用程序?

谢谢,哈里什

最佳答案

我尝试的第一件事是获取线程转储并查看正在运行的内容。

来自 this article :

Generating Java Thread Dumps Thread Dump is generated by sending a SIGQUIT signal to the JVM process. There are different ways of sending this signal to the process.

In Unix, use "kill -3 " where pid is the Process ID of the JVM.

In Windows, press CTRL+BREAK on the window where the JVM is running

这至少会告诉您应用程序中的哪些线程正在运行,并为您提供有关正在发生的事情的基本指示。 jstack将提供另一种获取此信息的方法,对于与控制台断开连接的服务器进程来说可能更容易。

可以使用VisualVM 获得更详细的报告。报告线程/CPU + 内存使用情况。

关于tomcat - 分析tomcat中CPU占用率过高,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11103590/

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