-
Notifications
You must be signed in to change notification settings - Fork 172
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
Can't stop gracefully multiple server instances in the same application #1069
Comments
Hey @aoudiamoncef Which versions of tokio are you using? If you can downgrade tokio to 1.26 that should fix it temporary I think. |
Hi, We are using the last stable release of |
gotcha, something else then I suppose. Can you elaborate what do you mean by "three instances"? Are these separate servers i.e, you call |
The problem is the fact that to trigger a graceful shutdown, we should send a request to trigger It. A simple The workaround is: OK, I'll send a request to stop my running API. But if I have multiples instances, I have to send n queries to stop each one. We should be able to trigger the stop handle without sending a request. |
We changed this recently on master to to handle connections tasks in tokio::spawn instead of the Thus, I think this is already fixed on master but could be wrong. Would be great if you could test it 🙏 |
Hi @niklasad1 I confirm that switching to 118acc3 commit in master branch solves the issue. Thank you so much 👍🏻 |
Cool thanks for confirming, just be bare in mind that master has backpressure which may affect your connections, subscriptions and similar. We will prep a new release soon |
Hello,
Currently, I'm working with
jsonrpsee
and I started 3 instances A B and C in the same application.When I send a request to stop the application in A, we call
stop()
method in the three instances, but with actual implementation, B and C will never stop. We have to send additional requests to B and C to trigger the graceful shutdown.To trigger a shutdown, we must create a connection to B and C to trigger the
stop_handle
.A simple
CTRL+C
will never trigger the graceful shutdown.More detail massalabs/massa#3759)
I'm waiting for feedback, if we could contribute upstream, we'll be happy to help.
Thanks
The text was updated successfully, but these errors were encountered: