Answer the question
In order to leave comments, you need to log in
How to speed up the launch time of the first page (authorization page)?
Good afternoon!
When you first enter an ASP MVC site, the page takes a very long time to load (5-7 seconds).
How can I speed up the download time?
As far as I know, the matter may be related to various caching and ApplicationPool, but I have not yet been able to figure out what to do to speed up the launch.
Who faced similar problems, tell me what can be done?
Answer the question
In order to leave comments, you need to log in
If the delay is 5-7 seconds, then most likely this is due to the stop of the ApplicationPool. If there are no requests for some time (20 minutes by default), IIS stops the process that serves the site's up-pool. Accordingly, if a request comes in and the pool is stopped, then IIS needs to start the process, raise all the modules for the site, download and start the site itself, and only after all this the site will be ready to process requests. Hence such a significant delay on the first request, all subsequent requests will be processed quickly.
To change this behavior, you need to select the pool in IIS-Manager, then Advanced Settings and there are two parameters: "Idle Time-out" and "Idle Time-out Action". The latter is responsible for the action after the timeout expires, by default it is Terminate, i.e. interrupt the process can be changed to Suspend (suspend but not kill the process). Also there is a "Start Mode" parameter, and there is OnDemand (on request) by default, you can change it to AlwaysRunning (i.e. always running).
But it is worth considering that a constantly running up-pool process will consume a lot of memory and a certain amount of processor time, and if the application is rarely used, then it will essentially waste server resources.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question