Timeout capturing a snapshot with a 50GB heap

Questions about YourKit Java Profiler
Post Reply
burn
Posts: 2
Joined: Wed Jun 26, 2019 1:08 pm

Timeout capturing a snapshot with a 50GB heap

Post by burn »

When requesting a memory snapshot I get a read timeout (no app running at 127.0.0.1 ....) I have increased the 3 socket timeouts to 5mins (1 in agent, 2 in client) but the app writes only 1212 bytes in the snapshot and then hangs in some loop at 100% CPU for hours after the client times out.
I'm using 2019.1-b133 with a Mac client and a remote linux app with Xmx90G ... is there a problem with large heaps?
burn
Posts: 2
Joined: Wed Jun 26, 2019 1:08 pm

Re: Timeout capturing a snapshot with a 50GB heap

Post by burn »

I see it took 12hrs to save a 40GB snapshot file so I guess I need to shrink my application. I also found it took more than 2hrs to advance the generation number and the client connection timed out. Is it correct that the client cannot reconnect until that operation completes?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Timeout capturing a snapshot with a 50GB heap

Post by Anton Katilin »

The UI will be able to reconnect after the snapshot capture completes.
ioutkine
Posts: 5
Joined: Thu Dec 19, 2019 5:27 am

Re: Timeout capturing a snapshot with a 50GB heap

Post by ioutkine »

I am using 2019.8-b127 and I consistently get timeout when I try to get memory snapshot even locally. Total memory is not too high - 7GB.
Are there settings that can increase default timeout? It is frustrating that I paid money but the program does not serve the purpose
ioutkine
Posts: 5
Joined: Thu Dec 19, 2019 5:27 am

Re: Timeout capturing a snapshot with a 50GB heap

Post by ioutkine »

Eventually I managed to get the snapshot but when I ran inspections I got out of memory error. Total YK memory is just 14GB. How can I increase this amount?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Timeout capturing a snapshot with a 50GB heap

Post by Anton Katilin »

1. To increase timeout:

- In the profiler UI, please set timeout by adding the following option
to <user home>/.yjp/ui.ini:

-Dyk.controller.connect.timeout.ms=60000
-Dyk.controller.read.timeout.ms=60000

- In the profiler agent, please use the agent startup option
_socket_timeout_ms=60000

Anyway, even if the profiler UI disconnects due to a timeout, you can reconnect it to the profiled application after the snapshot capture is done. No information should be lost.

2. Regarding out of memory.
If it's a Java level OOME, please increase the -Xmx value in <user home>/.yjp/ui.ini
If it's a lack of virtual memory, please increase the swap file capacity or use a machine with more virtual memory available.
Post Reply