JVM hangs when memory snapshot is trigged gor large heap

Questions about YourKit Java Profiler
Post Reply
chris.white
Posts: 2
Joined: Wed Jun 23, 2021 11:18 pm

JVM hangs when memory snapshot is trigged gor large heap

Post by chris.white »

I have a snapshot getting triggered when memory is 70% used.

If I am running with a large heap (20gb) the JVM becomes unresponsive when creating the snapshot and only a small but invalid snapshot file is produced.

This is with OpenJDK 64-Bit Server VM; 1.8.0_292; 25.292-b10; mixed mode running on CentOS Linux release 7.5.1804 (Core). Kernel is 3.10.0-862.11.6.el7.x86_64.

I can still see the java process and all the threads running using 'ps' but the YourKit client can no longer connect to the JVM.

This is with YourKit 2013.1-b230 for the client and YourKit-JavaProfiler-Linux-2021.3-b231 on the server.

Any ideas what could be going wrong?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: JVM hangs when memory snapshot is trigged gor large heap

Post by Anton Katilin »

Hello Chris,

Could you please provide the profiler agent log file <user home>/.yjp/log/<session name>-<pid>.log
You can send it to [email protected]

Is there enough disk space for the snapshot? Snapshot size on disk is not directly equal to the Java process heap memory size but it can be used as an estimation.

A memory snapshot capture may take time, especially for such large heaps. There is a chance that the capture is still in progress and you will be able to connect to the profiled process later. If the profiled process keeps running, please try to reconnect later.

As a workaround please capture a HPROF dump: https://www.yourkit.com/docs/java/help/ ... pshots.jsp

Best regards,
Anton
chris.white
Posts: 2
Joined: Wed Jun 23, 2021 11:18 pm

Re: JVM hangs when memory snapshot is trigged gor large heap

Post by chris.white »

Anton,

Thanks for the response. Very much appreciated.

Yes, we have plenty of disk.

And we have sometimes been able to reconnect after a while as you suggest.

I will reproduce this and send you the log.

Chris
Post Reply