Answer the question
In order to leave comments, you need to log in
How to speed up asp net core application startup?
I wrote an Http server that receives a post request to the address I need. The first response from him comes after a rather unpleasant long time, later everything is fine - the server responds in the same second. What should be entered and where, so that after restarting the server is already ready for quick responses?
Answer the question
In order to leave comments, you need to log in
If hosting on linux, try using HealthCheck
https://docs.microsoft.com/ru-ru/aspnet/core/host-...
along with BeatPulse
AND pull it curl every 5 minutes.
If IIS then try this
https://weblog.west-wind.com/posts/2013/Oct/02/Use...
nothing and nowhere, this is normal behavior when the application starts, all resources are initialized there, connections to the database, if any, and so on.
Looks like an unresolved issue: https://github.com/aspnet/Hosting/issues/809
perhaps this is a "cold start", there is such a feature "Always on", when it is active, the server does not unload the code from memory and always works, but this is available on a paid server.
You can try:
1. in the application publishing settings - File Publish Options, check the box "Precompile during publishing".
2. install the iis component - "Application Initialization" (where the Windows components are)
3. in the ApplicaitonPool settings, set the Start Mode to AlwaysRunning.
4. in the website settings - Preload Enabled = True
this is from the time of iis. there it is necessary to put a tick, the bark is a flag. I don't remember now but something like this https://serverfault.com/questions/683017/first-req...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question