Default ServerConfig implementations do not shut down gracefully
See original GitHub issueAt the moment, several of the server backends will terminate in-progress connections instead of shutting down gracefully. Wherever possible, we should make the default to do a graceful shutdown - this might not be available given the underlying server APIs available in each.
Need to write a test in ServerContract
and handle each backend in turn to see if we can make it pass.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Source code for flwr.server.app
If no implementation is provided, then `start_server` will use `flwr.server.client_manager. ... str(hist.metrics_centralized)) # Graceful shutdown ...
Read more >Chapter 2. Starting and Stopping JBoss EAP
JBoss EAP 7 introduced a suspend mode, which suspends server operations gracefully. This allows all active requests to complete normally, but will not...
Read more >mpm_common - Apache HTTP Server Version 2.4
Specify a timeout after which a gracefully shutdown server will exit. Syntax: GracefulShutdownTimeout seconds. Default: GracefulShutdownTimeout 0. Context: ...
Read more >WebServer (Helidon Project 2.5.4 API)
Attempt to gracefully shutdown server. It is possible to use returned Single to react. RequestMethod can be called periodically. Returns: a single to ......
Read more >Configuring Unleash
PS! Unleash will listen for the SIGINT signal and automatically trigger graceful shutdown of Unleash. If you need to stop Unleash (close database...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d ideally like to see all of the server’s do graceful shutdown by default (unless it makes them slow to stop if there are no requests). Each of the ServerConfigs should not take any extra config (to make things simple), but also be structured in a way that people can implement their own versions with minimum effort - eg. reusing the Servlet in the Jetty, or the handler in Undertow.
@daviddenton I’ve done a preliminary pull request to make
stop()
block until inflight requests are handled. I’ve chosen 10 seconds as the default graceful shutdown timeout, but the shutdown will occur as soon as the request is handled. This works for small responses but I haven’t checked for streaming and for really large responses where sending the response takes a long time.