-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
It will take a long time to turn off the HTTP service #3188
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
Comments
This looks like to me that there is connection that was received, but hasn't sent any headers. It will currently wait for that connection to send its first request. That's discussed in #2730. Besides probably fixing that in #2730, these would also be relevant:
|
I tried to test this version again, and I found a key issue. If there are no requests during shutdown, the shutdown will be slow, but if there are new requests entering (during shutdown), the shutdown will be fast. What is the reason? Shutdown, new requests,Very slow, took around 100s, log:
Shutdown, new requests, It's fast and only takes about 4s, log:
This should not be normal behavior, should it be normal behavior to shut down and reject new requests? |
Version
List the version(s) of
hyper
, and any relevant hyper dependency (such ash2
if this is related to HTTP/2).Platform
The output of
uname -a
(UNIX), or version and 32 or 64-bit (Windows)64-bit (Windows)
Description
Enter your issue details here.
One way to structure the description:
I reported this issue at
axum
:tokio-rs/axum#991, but the shutdown ofaxum
originated from super, so I briefly explained this issue. I made a very simple API derived from the examplehello world
+Graceful shutdown
. If you only start the http server, it will be shut down immediately, which is very fast, but if you have counted a request, it will get stuck here after shutdown:Total waiting time: 17:14:59 ~ 17:17:34 = 153 s..
2023-03-30 17:14:59.9818 TRACE mio::poll: deregistering event source from poller
[short summary of the bug]
I tried this code:
The text was updated successfully, but these errors were encountered: