Skip to content

alexey-anufriev/spring-boot-2.2.7-memory-leak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot v2.2.7 Memory Leak

Description

After upgrade from Spring Boot 2.2.6 to 2.2.7 application started consuming much more memory. In particular Heap Dump shows significantly higher number of instances of type: org.springframework.boot.loader.jar.JarFile.

Heap Dump (v2.2.6) is here. It contains the following number of instances: v226

Heap Dump (v2.2.7) is here. It contains the following number of instances: v227

The number of instances is significantly higher.

Reason

After checking the history of related changes there is a couple of commits that worth to be checked:

Create new JarFile instance for URL connections

Attempt to prevent JarFiles from being left open

Attempt to prevent JarFiles from being left open

Steps to reproduce

Checkout current repository and perform the following steps:

$ ./mvnw clean package
$ cd target
$ java -jar spring-boot-2.2.7.RELEASE-memory-leak.jar

Now memory profiler can be attached.

After, adjust the version of the parent (spring-boot-starter-parent) in POM to 2.2.6.RELEASE and perform the following steps:

$ ./mvnw clean package
$ cd target
$ java -jar spring-boot-2.2.6.RELEASE-memory-leak.jar

Now memory profiler can be attached again.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages