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

Question: What is the guidance on keeping the application running? #1085

Closed
andrew-vdb opened this issue Sep 6, 2016 · 7 comments
Closed

Comments

@andrew-vdb
Copy link

At this moment, I believe IIS kill the application after inactivity of the application.
The problem is the first request may take 30 seconds or more
The next request is quite fast.

What is the guidance as we have new server now?
Should I ping my website every 5 minutes or so?
Is it still worth it to have IIS to kill my application? (memory management etc)

@davidfowl
Copy link
Member

Your application is likely taking that long on the first request after restart because of view compilation (I assume it's an MVC site?)

@andrew-vdb
Copy link
Author

it is MVC site.
How to avoid re-compile? pinging will do?

@davidfowl
Copy link
Member

How to avoid re-compile? pinging will do?

Sure, we're also working on view pre-compilation for 1.1 which is a much better way to avoid compiling views at runtime.

@andrew-vdb
Copy link
Author

Hmm if you pre-compile my view, will updating the view still possible

on 1.0 you remove updating controller.cs
aspnet/Hosting#823 (comment)

on 1.1 you will remove upading view?

@davidfowl
Copy link
Member

on 1.0 you remove updating controller.cs

Yep. We'll you can kinda do it if you use dotnet run/watch in production but that is pretty untested.

on 1.1 you will remove upading view?

Nothing is being removed. It's an option you can choose to use.
If you pre-compile the views will be a dll, that dll needs to be updated to update your views.

Anyways this has nothing to do with Kestrel. The original question was about keeping the site warm. If you run with IIS you get the usual IIS behavior which is fine for the most part. If you want to keep the application alive then pinging it seems like a fine idea. There's an IIS feature that does application warmup but I'm not sure if it works with ASP.NET Core as yet

/cc @pranavkm

@guardrex
Copy link

guardrex commented Sep 6, 2016

Auto-start is discussed here: aspnet/IISIntegration#161
View precompilation is discussed in aspnet/Mvc#3917 including ✨ magical tooling ✨ by @tuespetre at https://github.com/tuespetre/dotnet-precompile-views

@andrew-vdb
Copy link
Author

Pinging will do and closed due duplicate

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

No branches or pull requests

3 participants