3

Sitecore version - 9.0.1 (rev. 171219)

After every deployment, to load the home page it is taking at least 20 mins thereafter every new page takes 2 mins on the first instance there after its pretty quick.

Looks like the issue is to do with compiling of razor view's I think? Is that true? I can see there is a similar topic in here Slow cshtml compilation on Azure WebApps

Is there a setting in Azure or Sitecore to speed this up?

All I can think off to better this is to compile the razor views. Is there a better way of handling this?

I have never found this issue with Sitecore before is this specific to this version or combination of the Azure web app and Sitecore?

  • What Azure Web Service Plan sizing and Sitecore topology are you using in Azure? – Pete Navarra Nov 15 '18 at 19:26
6

With regards to the initial very large time, what you're most likely hitting is that Sitecore can max out the Azure SQL on startup to fill the prefetch cache - see Sitecore Knowledge Base Article 290593 The solution is to disable the prefetch cache by using the configuration file on the attached knowledge base article.

According to Sitecore:

The Sitecore Experience Platform cache's prefetch functionality attempts to pre-populate item caches on role start up. This causes excessive SQL Server DTU consumption on the core database, SQL timeout exceptions, and unresponsive websites. In some cases, for example on topologies with 4 Sitecore roles and small SQL Server tiers, the DTU on the core database can reach 100% and remain there for up to 40 minutes.


With regards to the pages themselves taking time to load initially after startup, this is normal. You're right in noting that view precompilation is a good, fairly easy solution to this. We use RazorGenerator.MsBuild like in the example you link to. Just remember to set Mvc.UsePhysicalViewsIfNewer locally so that editing your .cshtml files actually makes a difference.


Finally, remember that Sitecore startup still does take time. There are lots of caches to warm up, pipelines to run, etc. This is perfectly normal, albeit sometimes annoying.

  • Thanks, If it is prefetch cache, how it is not affecting local environment or dev. This is only happening in Azure? – Dheeraj Palagiri Nov 16 '18 at 10:52
  • 1
    This is known to be an Azure problem as per the KB article. My understanding is how the performance is allocated. IE, the Azure SQL has a capped performance limit by it's DTU, whereas a normal SQL Server box can stretch to accomodate higher than normal peak performance requirements. Not sure on that, though – Matthew FitzGerald-Chamberlain Nov 16 '18 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.