-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Graceful shutdown stopped working on master #10289
Comments
@merlimat Thanks for the report. I'll take a look tomorrow. |
@merlimat I wasn't able to reproduce this issue. I started pulsar directly in the repository directory with
and the JVM stops as expected. I wonder if you were able to capture the exception stacktrace? |
No, I couldn’t see any stack trace. I think it was just the JVM default exception handler when the thread is terminated. I also cannot reproduce always, though I’ve seen it few times. I think we should prob just add a catch Throwable in there and it should fix it. One other minor thing that is reproducible is there seems to be always a 5 sec delay when the executors are being shut down. It seems like we’re always letting some operation to time out. |
I added printing of the stacktrace in #10304 .
I didn't yet add any new catches. I expect that #10304 changes will help find the underlying issue.
This is expected behavior. For Netty Event Loop Shutdown, there's a quiet time parameter. It's 2 seconds by default. I have increased it to use a fraction of the configured pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java Lines 794 to 803 in 152d1e6
Previously there was no delay since the shutdown didn't wait for the event loops to close at all. The default quiet time is 2 seconds and shutdown timeout 15 seconds in Netty. Those values were used, but the asynchronous return value was ignored. |
It might not be directly related to this issue, but #10365 fixed an issue in tests where the shutdown didn't complete gracefully. |
This should be fixed by #10304. Please re-open if the problem re-occurs. |
Trying to do a graceful stop of a broker with
CTRL-C
will fail due to an unexpected exception and then it will shutdown after 30 sec.The logs show:
@lhotari I think this is probably related to #10199
The text was updated successfully, but these errors were encountered: