Profile Image
Ratikanta

Springboot application RAM utilization goes on increasing and increasing

I came across a very ctitical issue where the RAM of spring application goes on increasing even through the Garbase are cleared.

 

Also this is happening even no traffic is there to the service in the local machine as well.

 

Any solution to this issue is most welcome.

  • springboot

  • memory

  • ram

Please Sign In or to post your comment or answer

Profile Image

Kousika M

Hello Ratikanta,

Greetings!

To check the increasing RAM utilization issue in your Spring Boot application, you can investigate the following areas like Memory Leaks( heap and non heap leaks), Caching Issues, Thread/Connection Leaks, Object Creation, Garbage Collection Tuning, Off-Heap Memory and Spring Configuration. Identifying this can help you find the root cause of the RAM utilization issue in your Spring Boot application.



 

Profile Image

Ram Lakshmanan

Hello Ratikanta!

 

 THere are few possiblities why RAM consumption was growing in your Spring Boot application:

 

a. Acute memory leak:

 

Your application could be suffering from acute memory leak (not aggressive enough to crash immediately), but slowly memory is leaking. In such circumstance you will see the GC behaviour to look like this:

 

Healthy saw-tooth GC pattern

 

This is a how GC behaviour will look for an healthy application. You can see memory goes down all the way to the bottom.

 

Acute memory leak GC pattern

 To learn more about these GC behvioural patterns visit this post: Garbage Collection Patterns to predict outages 

 

b. Some other process consuming memory:

 

 There could be some other process in the container/server is consuming memory. Say there could be a cron job or script consuming memory and it will also result in increas in RAM

 

c. Leak in Native Memory

 There are multiple memory regions in the JVM as shown in this image below. It could be possible your Young Gen, Old Gen might be healthy, however there could be a leak in other memory regions. In such circumstance you need to do Native Memory Tracking.

 

   JVM Memory Regions

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • springboot

  • memory

  • ram