Java service memory usage increasing

Viewed 467

Our backend services are developed with java springboot framework. One of the large services when kept running, memory utilization increases slowly as shown in the below snapshot. When it reaches 95%, the service goes down without any error logging. It's 32GB memory.

Memory utilization

Heap and GC stats seems to be fine.

Heap Usage

GC Usage

I also looked at the memory dump and didn't find any native code leak.

The landing page of the application is a dashboard for which concurrent requests are sent to the backend. The backend has to do quite a bit of processing for the same. The sudden spike in memory happens when the data for processing is more and it never comes down after that. I've looked at heap dumps and couldn't find any leak suspects.

What else could be causing the spike in memory utilization?

2 Answers

If the application is working properly it is not a problem, only that the garbage collector is not performing until 80% is reached. In fact, the graph with "GC New Gen Size" shows the typical "sawtooth" which is completely normal. In any case, you can adjust how the garbage collector will work.

For example: https://sematext.com/blog/java-garbage-collection-tuning/

enter image description here

In this chart, you can see something called “shark tooth”. Usually, it is a sign of a healthy JVM heap.

Related