-
Notifications
You must be signed in to change notification settings - Fork 524
IApplicationShutdown.RequestShutdown is does not serve the outstanding requests but dies #31
Comments
When disposed, Kestrel just starts closing sockets: |
I assume this bug is still valid? |
Yup, just checked with @anurse (who was playing with Kestrel) and Ctrl-C kills the process. |
This is graceful shutdown (draining remaining requests after shutdown.) @DamianEdwards Do you want this in RC1? Pull to RC1 milestone if so. |
I think post-RC is OK for this one. |
I had to rewrite @Praburaj's code since a few things have changed since this issue was filed. I rewrote it as:
I can't repro the original issue. Kestrel shuts down gracefully after the request is received (the browser shows the respose Let me know if I'm missing something here. |
Closing since it's an old issue that does not repro anymore. |
Hi, Maybe I'm misunderstanding the purpose of StopApplication() function, but if I do something like the following (on RC1-update1 on Windows with clr runtime)
It never prints "Done?" on the console or shows "Shutting down gracefully" on the browser assuming of course it actually takes a relatively long time on your machine to go through the loop. Is StopApplication() supposed to make sure this thing completes its processing before it shuts down the process or no? Doing something like |
@yousifh If you remove the for loop do you see "Done?" and "Shutting down gracefully"? Kestrel will not wait indefinitely for the application function to complete. In RC1-update1, I think it gives the app about 2.5 seconds to finish. |
@halter73 Yeah, it works fine once I remove the for loop. I wasn't aware the timeout Kestrel had while it waits to close down. I can see the 2.5 seconds timeout in KestrelEngine when it tries to stop each KestrelThread. Thanks. |
Related# aspnet/HttpSysServer#71
Send a request to the application. It is expected to serve the outstanding requests and die. This works as expected on Helios.
On Kestrel the event seems to be honored, but the outstanding request is not served. The host process simply gets killed.
On weblistener this event is not being honored. This item tracks the issue for weblistener: aspnet/HttpSysServer#71
The text was updated successfully, but these errors were encountered: