Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow server shutdown starting with spring boot 3.2.x (tomcat) #40057

Closed
copa2 opened this issue Mar 21, 2024 · 2 comments
Closed

Slow server shutdown starting with spring boot 3.2.x (tomcat) #40057

copa2 opened this issue Mar 21, 2024 · 2 comments
Labels
status: duplicate A duplicate of another issue

Comments

@copa2
Copy link

copa2 commented Mar 21, 2024

Hi

Starting with spring boot 3.2.x shutdown of application with tomcat takes now ~ 11 seconds when using SIGTERM.
By default it uses server.shutdown=immediate. When changing to graceful it is faster (~4 seconds).

This behavior started with spring boot 3.2.x
Previous versions (3.1.x,3.0.x) have a fast shutdown ~ 3 seconds.
3.1.10 and 3.2.3 use the same tomcat version (10.1.19).

Created minimal example: https://github.com/copa2/spring-long-shutdown

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 21, 2024
@copa2
Copy link
Author

copa2 commented Mar 21, 2024

Sorry. Didn't see this before. Duplicate of #39735

@copa2 copa2 closed this as completed Mar 21, 2024
@wilkinsona
Copy link
Member

Thanks, @copa2. I was just about to comment with a link to that issue.

For background, this has changed in Spring Boot 3.2.x is due to some slight changes to how we shut Tomcat down in support of CRaC. We have separated stopping Tomcat (such that it could be restarted) from destroying it (such that it can't be restarted). The delay that you've observed here that can occur in certain circumstances is an unfortunate side-effect of this. Our hope is that it can be addressed in Tomcat. In the meantime, configuring server.address appears to be a reliable workaround.

/cc @markt-asf

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2024
@wilkinsona wilkinsona added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants