Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Kestrel takes 2-3 seconds to shutdown if any connections have been made #247

Closed
AspNetSmurfLab opened this issue Oct 7, 2015 · 6 comments
Assignees
Milestone

Comments

@AspNetSmurfLab
Copy link

Kestrel is taking 2-3 seconds to shutdown (e.g. after Ctrl-C) if any connections have been made to it. This is causing the development experience in Visual Studio to be poor due to the long time it takes to get the server going again after making a code change.

Repro steps

  1. Start the server
  2. Immediately Ctrl-C to end it without making a request
  3. It exits immediately
  4. Start the server again
  5. Make a request from a browser then close the browser
  6. Ctrl-C the kestrel server
  7. It takes 2-3 seconds for the process to end

by @DamianEdwards

@muratg
Copy link
Contributor

muratg commented Oct 8, 2015

OK, let's investigate what we can do for Beta 8.

halter73 added a commit that referenced this issue Oct 8, 2015
- This is a temporary fix that doesn't try to gracefully close connections

#247
@halter73
Copy link
Member

halter73 commented Oct 9, 2015

@muratg I tested the shalter/247 branch referenced above with the new WTE build. This seemed to reduce the time window where you could get a 502.3 response, but didn't eliminate it completely.

Bill thinks that the change to kill iisexpress on ctrl+f5 could fix the 502.3 issue as well, so I'm waiting on that change before doing any further work on this.

@muratg
Copy link
Contributor

muratg commented Oct 9, 2015

@halter73 Sounds good. If WTE change ends up eliminating the need to do this in Beta 8, please move to RC1.

@muratg muratg modified the milestones: 1.0.0-rc1, 1.0.0-beta8 Oct 12, 2015
@halter73 halter73 modified the milestones: 1.0.0-rc2, 1.0.0-rc1 Oct 26, 2015
@halter73 halter73 assigned cesarblum and unassigned halter73 Nov 19, 2015
@muratg muratg assigned halter73 and unassigned cesarblum Dec 3, 2015
@muratg
Copy link
Contributor

muratg commented Dec 3, 2015

Assigning back to @halter73 as @CesarBS doesn't have cycles currently to work on this.

@halter73 Please look into this when you're in-progress work is done as it's a bad developer experience problem.

@balneaves
Copy link

Not sure if this is the same bug/related, but kestrel wont respond (at all) to CTRL+C after it has served at least 1 page on OSX + CoreCLR. If I CTRL+C before serving a page it exits properly.

Mono works fine and exits at any time.

dnx-coreclr-darwin-x64.1.0.0-rc2-16249

@DamianEdwards
Copy link
Member

Need for RC2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants