[英]Collecting Java heapdump under load
I am running load against Tomcat 6 running on Java 6. I want to collect a heapdump of the Java heap while the Tomcat server is under load. 我正在针对在Java 6上运行的Tomcat 6运行负载。我想在Tomcat服务器负载下收集Java堆的heapdump。 I normally use jmap -dump to collect my heapdumps.
我通常使用jmap -dump收集我的heapdumps。
However, when I try to do this when Tomcat is handling a high load I find that the heapdump collection fails. 但是,当我尝试在Tomcat处理高负载时执行此操作时,我发现heapdump收集失败。
Is jmap the best tool for collecting a heap dump from a process under load? jmap是从负载下的进程收集堆转储的最佳工具吗? What are the possible causes which would cause jmap to fail to collect a heapdump?
有哪些可能的原因会导致jmap无法收集堆转储?
If jmap is not the best tool - what is better? 如果jmap不是最好的工具-哪个更好?
It is entirely acceptable to me for jmap (or some other tool) to stop the world within the Java process while the heap dump is taken. 对于jmap(或其他工具)来说,在进行堆转储时停止Java进程中的世界对我来说是完全可以接受的。
Is jmap the best tool for collecting a heap dump from a process under load? jmap是从负载下的进程收集堆转储的最佳工具吗?
I think: No it isn't. 我认为:不,不是。 From this link :
从此链接 :
NOTE - This utility is unsupported and may or may not be available in future versions of the JDK.
注意-此实用程序不受支持,在JDK的将来版本中可能可用,也可能不可用。
I've also found jmap can pretty temperamental. 我还发现jmap很有气质。 If you're having problems:
如果您遇到问题:
I have found that running Tomcat with a JMX port allows me to take a remote heapdump using visualvm. 我发现使用JMX端口运行Tomcat允许我使用visualvm进行远程堆转储。 This succeeded for me when jmap failed.
当jmap失败时,这对我来说成功了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.