Hi,
we've just bumped Springboot version from 2.2.1 to 2.2.6 and suddenly our app's startup time almost doubled, both in the AWS pipeline (45s -> 80s) and ECS instance (150s -> 338s). We run dockerized jar file with Java 11. After some tests, we managed to pinpoint the slowdown to version 2.2.5. We don't change anything else in the code or dependencies.
Can you guide us what may have caused such a difference? Anyone else reporting similar issues? I've seen that Spring started supporting Java 14 with this version, can it be connected?
I include some of dependencies we use, I cannot share the project.
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-quartz'
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-cache'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation "org.springframework.kafka:spring-kafka-test:$springKafkaVersion"
testImplementation('org.springframework.boot:spring-boot-starter-test')
implementation 'org.springframework.retry:spring-retry'
implementation "org.springframework.kafka:spring-kafka:$springKafkaVersion"
Spring-kafka version didn't change.
Comment From: wilkinsona
Thanks for the report.
Can you guide us what may have caused such a difference?
I'm not aware of any changes that would have caused this.
Anyone else reporting similar issues?
No.
I've seen that Spring started supporting Java 14 with this version, can it be connected?
Support for Java 14 was a testing effort. We did not make any changes to the main code to support it.
I include some of dependencies we use, I cannot share the project.
Unfortunately, without something that reproduces the problem or sufficient information to identify that case, I don't think we're going to be able to help you here.
I would recommend reviewing your application's logs or profiling it to see if you can identify where the time is being spent. You may also want to review the dependency upgrades made in 2.2.5 to see which are applicable to you. Overriding the versions in your pom.xml
or build.gradle
may make it possible to identify a specific upgrade that caused the problem.
If you can provide us with a small sample (it doesn't have to be your actual project) that reproduces the problem, or with diagnostic information that identifies that the additional time is being spent in Spring Boot, then we can take another look.
Comment From: mateuszjadczykDna
@wilkinsona Thanks for the quick reply. Just wanted to make sure there were no other signs of this before we dig into other dependencies.
I did as you suggested, and quickly found that it's micrometer causing this. Linking the issue as others using kafka-streams may hit it too. Maybe you'd like to bump micrometer as soon as the fix is released. We reverted back to io.micrometer:micrometer-core:1.3.2
for now.
https://github.com/micrometer-metrics/micrometer/issues/1942
Closing the issue.