Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to improve startup performance on IIS / ASP.Net

Tags:

asp.net

iis

I am using a particularly slow virtual web host (name withheld!) where disk performance can be very bad. Thus, the first hit to my ASP.Net web sites can take 1+ minutes to load. (After initial load, it's all in RAM and fine.)

I am wondering if anyone knows a way to instruct IIS to pre-load the site? Is essence, emulate the first hit?

I have played with all the precompilation stuff, it helps, but it's not a substitute for the above.

Thanks!

like image 698
Matt Sherman Avatar asked Apr 22 '09 00:04

Matt Sherman


People also ask

Why is my ASP website loading so slow?

An IIS or ASP.NET hang can cause your website to have slow page loads, timeouts, or 503 Service Unavailable errors. Hangs can be caused by blocked ASP.NET threads, bad configuration, or request queueing.


1 Answers

Does your application need to recycle? All of the recycle options are in the IIS configuration and can be adjusted to be appropriate for your application.

The ideal scenario would be to remove all of the application recycles so that the application always remains loaded. Recycling would then only occur if the web.config file was changed or a new version of the application was deployed.

If daily recycling is required, as per the previous answer, a batch file could be used to recycle the application and it could also call iexplore.exe with the URL of the application to "pre-load" it.

like image 81
Anthony Avatar answered Oct 20 '22 08:10

Anthony