OutOfMemory with -Xmx32G

Questions about YourKit Java Profiler
Post Reply
jansorg
Posts: 4
Joined: Fri May 23, 2025 9:01 am

OutOfMemory with -Xmx32G

Post by jansorg »

I attempted to open a snapshot (size 1446 MB) and YourKit displayed an OutOfMemory error.

I defined -Xmx32G in ui.ini, but memory usage of the OOM YourKit is reported at ~9GB.

How can I open and analyze the snapshot?

Command line as reported by "jps -lvm":
133317 /opt/yourkit/bin/../lib/yourkit.jar -Xmx8G -Djava.awt.smartInvalidate=true -Djna.nosys=true \n-XX:+HeapDumpOnOutOfMemoryError\n\n-Xmx32G\n-server\n\n\n\n\n-Dsun.java2d.uiScale=2\n\n-Dyk.font.name=Dialog\n-Dyk.font.size=9 -Dyk.empty.param --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED -Dawt.toolkit.name=XToolkit

Possible fix: The commandline contains linefeeds. I modified profiler.sh with a tr '\n' ' ' to replace linefeeds taken from ui.ini with a space. This seems to have fixed it.

Image
Vladimir Kondratyev
Posts: 1676
Joined: Tue Aug 10, 2004 7:52 pm

Re: OutOfMemory with -Xmx32G

Post by Vladimir Kondratyev »

Thank you for reporting this issue. We are investigating. As a temporary workaround, please adjust JAVA_HEAP_LIMIT parameter inside profiler.sh script.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
jansorg
Posts: 4
Joined: Fri May 23, 2025 9:01 am

Re: OutOfMemory with -Xmx32G

Post by jansorg »

Thank you, with the workaround of JAVA_HEAP_LIMIT=32G it's consuming substantially more memory now (which is good).
Vladimir Kondratyev
Posts: 1676
Joined: Tue Aug 10, 2004 7:52 pm

Re: OutOfMemory with -Xmx32G

Post by Vladimir Kondratyev »

We have found a problem that could cause the profiler to ignore the settings in the ui.ini file. The fix is included in the latest build 2025.3.141. Please give it a try and let us know if the issue is resolved.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Post Reply