ASP.NET warmup/initialize
NickName:mikeesouth Ask DateTime:2012-08-08T05:14:22

ASP.NET warmup/initialize

I'm trying to eliminate (or at least minimize) startup/warmup times for my .NET applications. I'm not really sure on how to do this even though it's a common concern.

There's a ton of questions about slow startup of .NET applications. These are easily explained by pool recycles, worker process startup, dynamic compilation of .aspx files, JIT etc. In addition, there are more things that may need to be initialized within the application such as EntityFramework and application caches.

I've found alot of different solutions such as:

However, I'm not entirely satisfied with any of the solutions above. Furthermore I'm deploying my applications to Azure Websites (in most cases) so I have limited access to the IIS.

I know that there are some custom "warmup scripts" that uses various methods for sending requests to the application (e.g. wget/curl). My idea is to create a "Warmup.aspx" page in each of my ASP.NET applications. Then I have a warmup service that sends an HTTP GET to the Warmup.aspx of each site every ... 5 minutes. This service could be a WorkerRole in Azure or a Windows Service in an on-premise installation. Warmup.aspx will will then do the following:

  • Send an HTTP GET to each .aspx-file within the application (to dynamically compile the page)
    • This could be avoided by precompiling the .aspx pages using aspnet_compiler.exe
  • Send a query to the database to initialize EntityFramework
  • Initialize application caches etc

So, my final question is whether there are better alternatives than my "Warmup.aspx" script? And is it a good approach or do you recommend some other method? I would really like some official method that would handle the above criteria.

Any and all suggestions are welcome, thanks!

Copyright Notice:Content Author:「mikeesouth」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/11854243/asp-net-warmup-initialize

Answers
Aby 2013-09-10T18:14:55

Did you try this IIS Auto-Start feature described here ?\n\nhttps://www.simple-talk.com/blogs/2013/03/05/speeding-up-your-application-with-the-iis-auto-start-feature/",


More about “ASP.NET warmup/initialize” related questions

ASP.NET warmup/initialize

I'm trying to eliminate (or at least minimize) startup/warmup times for my .NET applications. I'm not really sure on how to do this even though it's a common concern. There's a ton of questions ab...

Show Detail

A simple application warmup method for Azure Web Sites

I would like to use the IIS application warmup or initialization feature of IIS that makes a site load faster instead of having long wait times the first time or anything that fulfills a similar pu...

Show Detail

HHVM Warmup Flow

I have included server.hdf in my hhvm server startup command. Server { WarmupRequests { * = /var/www/app/hhvm_warmup.php * = /var/www/app/hhvm_warmup.php * = /var/www/...

Show Detail

No warmup before serving requests in GAE

Why is AppEngine serving my requests using cold dynamic instances, without a prior warmup? I have a web app using Spring Security and Spring MVC, so initializing the contexts take a lot of time, a...

Show Detail

Warmup Requests on NodeJS causing corruption?

I have a node server running in App Engine standard using a custom domain. Everything works fine. When I deploy a new version there is a huge latency spike as the old instances are stopped and new...

Show Detail

Warmup requests for PHP 7.2?

The current documentation of AppEngine for PHP 7.2 does not mention warmup requests. While I can configure some warmup settings, I cannot specify a specific handler. app.yaml excerpt: # url handl...

Show Detail

ASP.NET Core 2.2 Site Warmup

I've migrated a .NET Framework 4.6 WebApi to .NETCore 2.2 and am having trouble getting the IIS ApplicationInitialization module to call my endpoints on a startup/slot swap/scale out. I added a ...

Show Detail

Kerastuner objective warmup

I am tuning the parameters of a regression model on an objective that can have very small values at the beginning of training. It measures the smoothness of the regression function, s.t., when the

Show Detail

Readiness Healthcheck with warmup C#

I am using Readiness healthchecks for my project and want to add a warmup period to it. Dependency Injection is being used to get the warmup task from the Kernel but I am not able to get it because...

Show Detail

IIS 7.5 Application Initialization for ASP.NET web service (warmup) without remapping requests

I'm trying to use the IIS 7.5 Application Initialization extension to configure a warmup process for my web application. This is an approach I am taking to minimize slow downs caused by application...

Show Detail