João Neto's Blog

João Neto's Blog

Go home Core database, you’re drunk.

Go home Core database, you’re drunk.

Subscribe to my newsletter and never miss my upcoming articles

Recently, after pulling the latest changes from my team, my local Sitecore installation started showing every item duplicated. Not only the LaunchPad was behaving like that, but also the Content Editor.

This issue only appeared in local Sitecore installation. Azure environments (DTAP) where not reproducing this issue. What was happening?

image.png

Excessive SQL Server DTU consumption after deployment to Azure

After every deployment, we were getting SQL timeout exceptions, and unresponsive websites in our Azure environments. To resolve this issue, we disabled the Sitecore prefetch cache functionality on all Sitecore-based roles as suggested https://kb.sitecore.net/articles/290593.

To disable the Sitecore prefetch, we added the DisablePrefetchCache.config file.

image.png

It had to do with the Unicorn configuration

If you open the Unicorn.DataProvider.config file that comes by default in the Unicorn NuGet package, you’ll notice that it is replacing the same data providers that the DisablePrefetchCache.config file is trying to change.

image.png

As the Unicorn configuration takes precedence, it renames the data providers. When the DisablePrefetchCache.config comes on the scene, it basically re-creates the data providers.

As we were disabling Unicorn synchronization in our Azure environments, this problem didn’t occur on these environments.

How did we fix it?

We added a transformation file to the DisablePrefetchCache.config when in Debug that basically removed all nodes that were changing to the data providers. This way, the local Sitecore installation wouldn’t have items duplicated.

image.png

 
Share this
Proudly part of