2 years ago

#56277

test-img

Thomazzz

When I manually start the garbage collector from visualvm - everything is OK, but the regular GC does not collect garbage

A strange situation,

i use java: 1.8.0_271 and tomcat: 9.0.39

there are a number of services on tomcat, after a certain time I notice an OutOfMemoryError error in the logs, and indeed all the memory is used up. At the same time, if I manually start garbage collection from visualvm, then the memory is released.

The dump does not show anything, analyzed JProfiler and MAT - it seems to cut off the used memory, leaving only a little free that remains.

And yet, after restarting all the services individually, the memory is still not released, you have to restart tomcat

my GP parameters (I have experimented with others but to no avail)

-XX:+UseG1GC
-XX:+PerfDisableSharedMem
-XX:+ParallelRefProcEnabled
-XX:MaxGCPauseMillis=250
-XX:+AlwaysPreTouch
-XX:+ExplicitGCInvokesConcurrent
-verbose:gc
-XX:+PrintHeapAtGC
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintGCTimeStamps
-XX:+PrintTenuringDistribution
-XX:+PrintGCApplicationStoppedTime
-XX:+PrintGCApplicationConcurrentTime

And most importantly, when I try to upload a dump to a profiler (MAT and others), I get a message.

Removed 15 875 439 unreachable objects using 1 700 938 414 bytes

Why can't he display these objects, I need to see exactly them

What could it be?

java

tomcat

memory-leaks

garbage-collection

out-of-memory

0 Answers

Your Answer

Accepted video resources