Java Tomcat 高 CPU 使用率

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29865740/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 08:43:43  来源:igfitidea点击:

Tomcat High Cpu Usage

javatomcat

提问by Rockroxx

We have 2 tomcat instances running on the same server of which one is causing regular high cpu load. I have run a profiler on the server but it has only told me that java.lang.Thread.run() is hogging the cpu nothing more conclusive. The cpu spikes are from 0% to 45/55% every 4 seconds.

我们在同一台服务器上运行 2 个 tomcat 实例,其中一个导致常规的高 CPU 负载。我在服务器上运行了一个分析器,但它只告诉我 java.lang.Thread.run() 正在占用 CPU,没有什么更确定的。cpu 峰值每 4 秒从 0% 到 45/55%。

Is it possible that it is not the application itself but a misconfiguration of the apache part? How would i go about finding the issue?

是否有可能不是应用程序本身而是 apache 部分的错误配置?我将如何去寻找问题?

回答by Aljoscha

Maybe blocked threads ? Look here for how to make thread dumps and check for blocked threads.

也许阻塞的线程?在此处查看如何进行线程转储并检查阻塞的线程。

http://middlewaremagic.com/weblogic/?p=2281

http://middlewaremagic.com/weblogic/?p=2281