Go home Core database, you’re drunk.

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?

Figure 1: Duplicated items in Content Editor

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.

Figure 2: DisablePrefetchCache.config file.

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.

Figure 3: Excerpt from Unicorn.DataProvider.config

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.

Figure 4: Sitecore.Disable.Prefetch.Debug.config file

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s