D
D
D8i2019-03-13 21:39:05
ASP.NET
D8i, 2019-03-13 21:39:05

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

7 answer(s)
O
oldhowl, 2019-03-14
@D8i

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...

C
CHolfield, 2019-03-13
@CHolfield

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.

O
ofigenn, 2019-03-13
@ofigenn

Looks like an unresolved issue: https://github.com/aspnet/Hosting/issues/809

D
Dmitry Bashinsky, 2019-03-14
@BashkaMen

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.

R
Ruslan Samigullin, 2019-03-15
@reesly

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

D
Dmitry Makarov, 2019-03-15
@MDiMaI666

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 question

Ask a Question

731 491 924 answers to any question