-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Description
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:

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

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
The following repository can be used:
https://github.com/alexey-anufriev/spring-boot-2.2.7-memory-leak#steps-to-reproduce