-
Notifications
You must be signed in to change notification settings - Fork 40.4k
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
DataSourceHealthIndicator thread blocked when health request is received during application shutting down #12508
Comments
Can you please provide the complete thread dump? The dump of a single thread doesn't really tell us what's going in. In the dump above, knowing what thread is holding |
hope, dump will be useful >
|
I can't see any sign of a problem or a race condition there. |
How long do you think this should be blocked ? (assume it's a small application) . Lock has not been released for 2 minutes. Usually if everything goes right as you'r saying, it returns quickly (within 5-10 seconds) . So because of this blocking it stays for around 2 minutes. |
I'd expect it to only be blocked for a short period of time. If that's not the case, then I suspect that there's a problem with the database which is causing the pool to take a long time to close all of the connections. That is something that is out of Spring Boot's control so I'm going to close this issue. If you investigate further and determine that Spring Boot is, in fact, responsible for the pool taking a long time to close all of its connections, please let us know and we can re-open this issue. |
Question
This is race condition -
DataSourceHealthIndicator thread blocked when health request is received during application shutting down.
Bug report
Spring version - 1.5.9.RELEASE
We have health monitoring system which hits application health url and when we shutdown application we noticed sometimes that thread HealthIndicator blocked. We investigated and found which thread blocked.
Steps to reproduce -
Logs ->
The text was updated successfully, but these errors were encountered: