-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG] Spring Boot application sometimes does not shutdown after closing client and Spring context #43345
Comments
@yiliuTo @saragluna could you please follow up? /cc @anuchandy as fyi |
@anuchandy, have you seen similar error logs before? |
Hi @saragluna, the first log from Also, in the usage code, there is no try-catch-ignore for |
hi @anuchandy, are you suggesting that the error is coming from the here are the rest of the logs between the abandon call and the different logs that chow up:
|
Hello @nateha1984, my main note was that we should ensure For a run where the container remains without exiting, could you share 15 minutes of debug logs before the app calls |
Describe the bug
Occasionally the Service Bus connection is preventing a Spring Boot application from shutting down after closing the client. We have an application that is started with a KEDA event to consume one message from a service bus queue. Most of the time, the application/job starts in AKS, consumes the message, then we close the client and the Spring context, which shuts down the app and thus stops the container. At times, there looks to be some failure in the client close code that ends up preventing the Spring app and thus the container from stopping, so it continues to run the job until we manually kill the pod.
When this happens, we can see the messages below in the logs, but no exception is logged (just the Azure SDK json messages).
Exception or Stack Trace
When the application DOES shutdown successfully, we see these messages at the end:
To Reproduce
Steps to reproduce the behavior:
Use a Spring Boot CommandLineRunner application to receive a message from an Azure Service Bus Queue, then close the ServiceBusReceiverClient once the message has been received, then close the context. Error is NOT happening all the time.
Code Snippet
Expected behavior
Application shuts down cleanly
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
Additional context
This looks to be the recommended way to shutdown a Spring Boot app in our situation, but open to other suggestions that might allow things to close more cleanly/consistently
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: