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 never finishes when there is opened connection #1885
Comments
I hit the same issue (via the Log
|
When opening a http1 connection, the keep_alive state is set to Busy, preventing a graceful_shutdown in that case. With this patch the keep_alive disabling and closing of idle connections is decoupled and should fix this issue. Closes hyperium#1885 Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
I think I ran into the same issue, see helgoboss/realearn#83 (comment). In my particular case, I need a "not so graceful" shutdown. It's absolutely essential to shut down the server as fast as possible without having to wait for connections that have unfinished business. My server lives in a desktop app plug-in that can be added/removed by the user at any time. From a UX perspective it would be a dealbreaker to force the user to wait and figure out which of his devices/browsers are still connected to the server. However, it would be totally okay if established connections are abruptly closed by the server side. As a dirty workaround, I patched hyper to make Log without that workaround (graceful shutdown was blocked from 13:44:35 until I closed the browser tab at 13:45:41):
|
If you want to forcibly shut down the server, then just let it drop. |
This comment has been minimized.
This comment has been minimized.
Closed by #3582. |
This will never exit. Something similar is doing google chrome. It creates two connections but sends request only to one of them. Fortunately chrome has some timeout so it closes that unused connection after some time and only after that finishes also hyper graceful shutdown.
When is this program run with argument then after one second it creates tcp connection and waits indefinitely without closing or dropping TcpStream. When is called without arguments then hyper server with graceful shutdown is created, it will run itself with argument so it will create child client process and never waits for child termination, then after 10 seconds is initiated graceful shutdown.
Possible output:
The text was updated successfully, but these errors were encountered: