3
votes

I've got an ASP.NET MVC site hosted as an Azure Web App and I've noticed that once the site has been idle for a while, when hitting it the application reverts to a deployed state.

Now traditionally, I would solve this problem by setting the Idle Timeout of the application pool in IIS to 0. However, given that I don't have ready access to do this with an Azure Web App I'm struggling to find the equivalent.

I did try the "Always On" setting which appears to be what I'm looking for, however it seemed to make absolutely no difference unfortunately.

1
Based on my experience , "Always on" should prevent IIS idle timout. It very odd that "Always On" doesnot work. Could please have a try to scale up and scale down back App service plan?Tom Sun - MSFT
Did you ever find anything out about this? I'm having the same issue. Always On does nothing. If I don't interact with the site for 5 minutes, the next time I click on something, it says "connecting..." for 30 seconds before the page loads. In my case, it is a Wordpress web app (Basic B1) with a mysql db (Saturn). Should be plentyuser1003916
@user1003916 Unfortunately I never really got a concrete answer, Always On seems to work a little better now, but nothing perfect. We do see similar behaviour to what you describe. However, one thing that has improved it is the use of monitoring software UptimeRobot, that seems to keep the site alive when it periodically checks (and it's free too).mattytommo
@mattytommo Great tip, thank you! This has been driving us nuts.. that sounds like it could help.user1003916

1 Answers

1
votes

Always On. By default, web apps are unloaded if they are idle for some period of time. This lets the system conserve resources. In Basic or Standard mode, you can enable Always On to keep the app loaded all the time. If your app runs continuous web jobs, you should enable Always On, or the web jobs may not run reliably.

From https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-configure

Make sure you're running in the right price tier (Basic / Standard).