title: Azure app service websites has slow response times after being idle for some time
body: <p>In the last couple of weeks we've been investigating some performance issues where our MVC application was responding very slow for the first request. We are talking like 30-45 seconds for the first request and 3 seconds for each new view. Our MVC application is using our OData API (Web API) which is located on the same server. Besides the same performance issues as the MVC application, the first query to entity framework version 6 is executing in 6 seconds and new queries is executing 200ms slower than subsequent queries.</p>
  
  <p>In order to meet our requirements, we have chosen to execute all known Ef queries and hit all our MVC/API endpoints from Application_Start in Global.asax. This seems to work fine for at least a couple of hours, but after some time without use, the first request to every MVC view is responding in 3-5 seconds.</p>
  
  <p>We have configured the websites to be "Always on" and we have not found anything in the IIS logs or the logging we've added to Application_Start. So it seems our applications are at least not recycling. I suspect some kind of IIS cache being cleared or maybe some Ef cache? Any suggestions are welcome.</p>