Taking Snapshot causing EOFException

Questions about YourKit Java Profiler
Post Reply
toyclimbs
Posts: 5
Joined: Mon Nov 01, 2021 6:03 pm

Taking Snapshot causing EOFException

Post by toyclimbs »

Hi,

I'm trying to take a snapshot from a pretty large heap (100G out of total heap 140G). I tried both from the UI and the command line and I'm getting the same error

Code: Select all

21.3-233 83696.367: com.yourkit.ak.ad.d.a: LC@282fbf52{localhost:10001,pid=85982}: com.yourkit.al.bj: There's no application running at localhost with profiler agent configured to listen on port 10001
or profiler agent is incompatible with current version of profiler
	at com.yourkit.h.c.k(a:360)
	at com.yourkit.h.c.a(a:328)
	at com.yourkit.h.c.a(a:283)
	at com.yourkit.h.c.a(a:1117)
	at com.yourkit.ak.ad.d.a.f(a:291)
	at com.yourkit.ak.ad.d.a.g(a:233)
	at com.yourkit.h.c.a(a:1109)
	at com.yourkit.h.c.a(a:306)
	at com.yourkit.h.c.a(a:283)
	at com.yourkit.h.c.c(a:1105)
	at com.yourkit.ak.ad.d.a.e(a:233)
	at com.yourkit.ak.ad.d.a.afb(a:129)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.io.EOFException
	at java.base/java.io.DataInputStream.readFully(DataInputStream.java:202)
	at java.base/java.io.DataInputStream.readLong(DataInputStream.java:421)
	at com.yourkit.h.f.a(a:50)
	at com.yourkit.h.f.a(a:82)
	at com.yourkit.h.f.b(a:72)
	at com.yourkit.h.c.b(a:1434)
	at com.yourkit.h.c.a(a:1129)
	at com.yourkit.h.c.a(a:324)
	... 16 more

21.3-233 83696.367: com.yourkit.ak.ad.d.a: Terminate DB update loop
21.3-233 92180.443: com.yourkit.ak.ad.bl: GC bean names: [Shenandoah Pauses, Shenandoah Cycles]
This is the command I run

java -Dyk.controller.connect.timeout.ms=6000000 -Dyk.controller.read.timeout.ms=6000000 -jar yjp-controller-api-redist.jar localhost 10001 capture-memory-snapshot

At first I got the ReatTimeout issue then I googled some and I added the timeout arguments but now I'm getting EOFException. I'm thinking that it could be because the heap was approaching the limits because it's a pretty large one 100G out of 140G but I'm not certain hence this question. Is there anything I can do to take a large JVM heap from Yourkit?

Thanks.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Taking Snapshot causing EOFException

Post by Anton Katilin »

Hello,

Most likely the profiler agent keeps capturing the snapshot despite the fact that the controller disconnects. While the snapshot is being captured, the controller may not be able to communicate with the agent.

Just let the agent complete the snapshot capture. It should eventually finish. You can check the profiler agent log file for progress and possible errors.

Snapshot file size on disk does not directly correspond to the JVM heap size in memory because the snapshot uses different data presentation.

Alternatively consider capturing a HPROF snapshot instead, it should complete much faster especially for a huge heap: https://www.yourkit.com/docs/java/help/ ... pshots.jsp

To make the snapshot smaller, please explicitly force garbage collection several times in a row to ensure most inaccessible objects are gone.
Post Reply