在生产系统上详细分析Tomcat堆 [英] Analyze Tomcat Heap in detail on a production System

查看:61
本文介绍了在生产系统上详细分析Tomcat堆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用JMX控制台分析了运行在Tomcat中的轻负载Web应用程序,事实证明,"PS Old Gen"正在缓慢而稳定地增长.它从200MB开始,然后以每小时80MB的速度增长.

Having analyzed a light-load web application running in tomcat, using JMX Console, it turns out the "PS Old Gen" is growing slowly but constant. It starts with 200MB and grows around 80MB/Hour.

CPU不是问题,它平均以0-1%的速度运行,但在某个地方会泄漏内存,因此部署后几天会变得不稳定.

CPU is not an issue, it runs at 0-1% on average, but somewhere it leaks memory, so it will become unstable some days after deployment.

我如何找出堆上分配了哪些对象?您知道有什么好的教程或工具吗?

How do i find out what objects are allocated on the heap? Are there any good tutorials or tools you know?

推荐答案

您可以尝试 jmap ,它是 JDK开发工具.您可以将 jhat 与输出一起使用使用您的Web浏览器进行堆堆转储.

You could try jmap, one of the JDK Development Tools. You can use jhat with the output to walk heap dumps using your web browser.

请参见此答案简短说明.

这种情况经常发生,因此在SO中搜索那些工具应该会找到一些替代方案.

This comes up quite often, so searching SO for those tools should turn up some alternatives.

这篇关于在生产系统上详细分析Tomcat堆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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