2

I have a website hosted on IIS on Azure Virtual Machine. After no activity for 1 hr, the first page loads very slowly however subsequent pages are loaded fast.

I beleive this is a cold start issue where if a website is not visited in the last 1 hour or so, the VM sets the website to a cold state. If I hit the website again after 1 hour, the first page load will be very slow.

I need information on how I can set the website within this IIS within the Azure VM to be always on so that it is always responding quickly on initial load (even if there was no activity for 1 hour or more).

  • Looks like its more to an IIS configuration? https://stackoverflow.com/questions/13386471/fixing-slow-initial-load-for-iis – thebernardlim Mar 10 '20 at 06:14

1 Answers1

0

Firstly, set up IIS on Windows Virtual Machine to add the feature of IIS manager.

Secondly, set IIS to keep website alive. The Application Initialization Feature can be installed as part of IIS features.

enter image description here

Thirdly, enabled Website or Application Preload.

enter image description here

And set Application Pool Start Mode: AlwaysRunning.

enter image description here

For more details, you could refer to this article.

Joey Cai
  • 18,968
  • 1
  • 20
  • 30
  • Seems to be always running now. Thanks for your help. – user3184224 Mar 25 '20 at 01:56
  • I had these 3 options accounted... However, for some reason my HangfireServer hosted on Azure VM IIS is shutting down in some moment.. and does not return till pinging it. Probably there are more settings responsible for that. – Alexander Jan 12 '21 at 13:57