Java RMI tcp memory issue

I have a problem that I can find in the profiler, but I don’t know how to fix it. After downloading the application, I get this sawtooth wave pattern, the program is idle, but consumes memory, as you can see here.

memory allocation over time

When I checked the memory allocation in the sampler, I saw that the RMI TCP connection with my eth0 (172.16.20.51) consumes memory at half a megabyte per second (413,213), which leads to the fact that the GC "stop the world" log is written into production: ( sample stream memory I could not track down the cause of this problem, because I don’t know which port is which thread, on the other hand, I tried to start my bank using -com.sun.management.jmxremote.authenticate = false -Dcom.sun.management. jmxremote.ssl = false flags, but this did not help. Any idea would be appreciated.

+7
java garbage-collection memory-leaks out-of-memory rmi
source share
1 answer

I know this is an old post, but since I came across it with the same problem, the answer might help others.

The RMI TCP connection flow is related to how the virtual virtual machine displays your memory usage. Thus, the high level of allocated bytes / sec is what you expect to see when profiling and you don’t necessarily indicate any problems with your application. See for example this SO question .

Regarding heap dumps, Visual VM has a “Heap Dump” button on the “Monitor” and “Sampler” tabs, which saves the heap dump file. You can download this, for example, in the free Eclipse Memory Analyzer (MAT) to investigate memory leaks, etc.

+10
source share

All Articles