asp.netazurepublishingapplication-start

ASP.net publishing project is slow to start


I have a fairly large website (~75k LoC), deployed two D2 v2 machines on Azure (7GiB RAM, 2 VCPU).

When I do a new build, I observe:

I'm trying to improve the time from when I publish to when Application_Start is fired as we publish regularly and it does cause some pain for visitors on the site.

Publishing the site consists of:

My question is:


Solution

  • What you are seeing is IIS starting up the application pool and it is normal for this to take awhile, especially if the site is large. The startup time is primarily limited by the hardware- as you are seeing one of the CPU cores reaching 100% that is your bottleneck.

    As you have two web servers the best way to deal with this would be to deploy to one server and then wait for it to come back online before deploying the second. Sending a warm up request after deployment will ensure that IIS starts up as quickly as possible.