Sitecore – The entire site stops working and is throwing errors

Update:
There’s a fix from Sitecore that can be found on this page.

Recently I’ve upgraded a clients solution to Sitecore 10.2, and all of the sudden (without changing anything) the site stopped working and was spitting out a continuous stream of errors. This was resolved after restarting the applicationpool, thus I didn’t think much of it.

Unfortunatetly this happened again later, and once more at another time but with a different error, thus it seemed like there was a real issue within Sitecore. At that time I directly created a Sitecore Support issue with memorydumps and all information I had, so that Sitecore could investigate and work on a solution.

A while later, another user on Slack reported seeing errors as well that were resolved by clearing the cache, with a slightly different error message then that I recieved. He also created a support issue, which eventually lead to the same public reference number.

As this issue is happening more widespread and not only on my project, I’ve decived to share all the different errors that we noticed, so that you can quickly identify if you are experiencing the same problem. If you are, please create a Sitecore support issue mentioning public reference #530961. At the time of writing there is no workaround or fix for this issue.

This issue has to do with the CompositeDataProvider and thus only affects Sitecore 10.1+. The issue occurs when accessing child items of a resource item concurrently and is more likely to occur if the number of child items is high.

The different errors

Type:     System.ArgumentNullException
	Message:  Value cannot be null.
	Stack:    
		[HelperMethodFrame]
		Sitecore.Diagnostics.Assert.ArgumentNotNull(System.Object, System.String)
		Sitecore.Data.Managers.ItemManager.GetItem(Sitecore.Data.ID, Sitecore.Globalization.Language, Sitecore.Data.Version, Sitecore.Data.Database, Sitecore.SecurityModel.SecurityCheck)
		Sitecore.Nexus.Data.DataCommands.GetChildrenCommand.Execute(Sitecore.Data.Items.Item)
		Sitecore.Data.Engines.EngineCommand`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].Execute()
		Sitecore.Data.Managers.ItemProvider.GetChildren(Sitecore.Data.Items.Item, Sitecore.Collections.ChildListOptions)
		Sitecore.Data.Managers.ItemProvider.GetChildren(Sitecore.Data.Items.Item, Sitecore.SecurityModel.SecurityCheck, Sitecore.Collections.ChildListOptions)
		Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(System.String[], Int32, Sitecore.Collections.ItemList)
		Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(System.String[], Int32, Sitecore.Collections.ItemList)
		Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(System.String[], Int32, Sitecore.Collections.ItemList)
		Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(System.String, Sitecore.Data.Database)
		Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.Execute(System.String, Sitecore.Data.Database)
		Sitecore.Data.Engines.EngineCommand`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].Execute()
		Sitecore.Data.Managers.ItemProvider.GetItem(System.String, Sitecore.Globalization.Language, Sitecore.Data.Version, Sitecore.Data.Database, Sitecore.SecurityModel.SecurityCheck)
		Sitecore.ContentTesting.Pipelines.ItemProvider.GetItem.GetItemUnderTestProcessor.GetItemByArgument(Sitecore.Pipelines.ItemProvider.GetItem.GetItemArgs)
		Sitecore.ContentTesting.Pipelines.ItemProvider.GetItem.GetItemUnderTestProcessor.Process(Sitecore.Pipelines.ItemProvider.GetItem.GetItemArgs)
		DynamicClass.(System.Object, System.Object)
		Sitecore.Pipelines.CorePipeline.Run(Sitecore.Pipelines.PipelineArgs)
		Sitecore.Data.Managers.DefaultItemManager.GetItem(System.String, Sitecore.Globalization.Language, Sitecore.Data.Version, Sitecore.Data.Database, Sitecore.SecurityModel.SecurityCheck)
		Sitecore.Data.Managers.ItemManager.GetItem(System.String, Sitecore.Globalization.Language, Sitecore.Data.Version, Sitecore.Data.Database, Sitecore.SecurityModel.SecurityCheck)
		Sitecore.Data.AliasResolver.get_Item(System.String)
		Sitecore.Data.AliasResolver.Exists(System.String)
		Sitecore.Pipelines.HttpRequest.AliasResolver.Process(Sitecore.Pipelines.HttpRequest.HttpRequestArgs)
		DynamicClass.(System.Object, System.Object)
		Sitecore.Pipelines.CorePipeline.Run(Sitecore.Pipelines.PipelineArgs)
		Sitecore.Pipelines.DefaultCorePipelineManager.Run(System.String, Sitecore.Pipelines.PipelineArgs, System.String, Boolean)
		Sitecore.Pipelines.DefaultCorePipelineManager.Run(System.String, Sitecore.Pipelines.PipelineArgs, System.String)
		Sitecore.Web.RequestEventsHandler.OnPostAuthenticateRequest(System.Web.HttpContextBase)
		System.Web.HttpApplication+SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
		System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep)
		System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
		System.Web.HttpApplication+PipelineStepManager.ResumeSteps(System.Exception)
		System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, System.AsyncCallback)
		System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)
		System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
		System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)
		DomainNeutralILStubClass.IL_STUB_ReversePInvoke(Int64, Int64, Int64, Int32)
		[InlinedCallFrame]
		[InlinedCallFrame]
		DomainNeutralILStubClass.IL_STUB_PInvoke(IntPtr, System.Web.RequestNotificationStatus ByRef)
		System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
		System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)
		DomainNeutralILStubClass.IL_STUB_ReversePInvoke(Int64, Int64, Int64, Int32)
		[ContextTransitionFrame]
Type:     System.IndexOutOfRangeException
	Message:  Index was outside the bounds of the array.
	Stack:    
		[HelperMethodFrame]
		System.Collections.Generic.List`1[[System.__Canon, mscorlib]].Add(System.__Canon)
		Sitecore.Data.DataProviders.PrefetchData.AddChildId(Sitecore.Data.ID)
		Sitecore.Data.DataProviders.PrefetchData.AddChildrenForEmptyDefinition(Sitecore.Collections.IDList)
		Sitecore.Data.DataProviders.Sql.SqlDataProvider.GetChildIDs(Sitecore.Data.ItemDefinition, Sitecore.Data.DataProviders.CallContext)
		Sitecore.Data.DataProviders.CompositeDataProvider+<DoGetChildIDs>d__94.MoveNext()
		Sitecore.Common.EnumerableExtensions.ForEach[[System.__Canon, mscorlib]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Action`1<System.__Canon>)
		Sitecore.Data.DataProviders.CompositeDataProvider.GetChildIDs(Sitecore.Data.ItemDefinition, Sitecore.Data.DataProviders.CallContext)
		Sitecore.Data.DataProviders.DataProvider.GetChildIDs(Sitecore.Data.ItemDefinition, Sitecore.Data.DataProviders.CallContext, Sitecore.Collections.DataProviderCollection)
		Sitecore.Data.DataSource.GetChildIDs(Sitecore.Data.ID)
		Sitecore.Nexus.Data.DataCommands.GetChildrenCommand.Execute(Sitecore.Data.Items.Item)
		Sitecore.Data.Engines.EngineCommand`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].Execute()
		Sitecore.Data.Managers.ItemProvider.GetChildren(Sitecore.Data.Items.Item, Sitecore.Collections.ChildListOptions)
		Sitecore.Data.Managers.ItemProvider.GetChildren(Sitecore.Data.Items.Item, Sitecore.SecurityModel.SecurityCheck, Sitecore.Collections.ChildListOptions)
		Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(System.String[], Int32, Sitecore.Collections.ItemList)
		Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(System.String[], Int32, Sitecore.Collections.ItemList)
		Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(System.String[], Int32, Sitecore.Collections.ItemList)
		Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(System.String, Sitecore.Data.Database)
		Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.Execute(System.String, Sitecore.Data.Database)
		Sitecore.Data.Engines.EngineCommand`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].Execute()
		Sitecore.Data.Managers.ItemProvider.GetItem(System.String, Sitecore.Globalization.Language, Sitecore.Data.Version, Sitecore.Data.Database, Sitecore.SecurityModel.SecurityCheck)
		Sitecore.ContentTesting.Pipelines.ItemProvider.GetItem.GetItemUnderTestProcessor.GetItemByArgument(Sitecore.Pipelines.ItemProvider.GetItem.GetItemArgs)
		Sitecore.ContentTesting.Pipelines.ItemProvider.GetItem.GetItemUnderTestProcessor.Process(Sitecore.Pipelines.ItemProvider.GetItem.GetItemArgs)
		DynamicClass.(System.Object, System.Object)
		Sitecore.Pipelines.CorePipeline.Run(Sitecore.Pipelines.PipelineArgs)
		Sitecore.Data.Managers.DefaultItemManager.GetItem(System.String, Sitecore.Globalization.Language, Sitecore.Data.Version, Sitecore.Data.Database, Sitecore.SecurityModel.SecurityCheck)
		Sitecore.Data.Managers.ItemManager.GetItem(System.String, Sitecore.Globalization.Language, Sitecore.Data.Version, Sitecore.Data.Database, Sitecore.SecurityModel.SecurityCheck)
		Sitecore.Data.AliasResolver.get_Item(System.String)
		Sitecore.Data.AliasResolver.Exists(System.String)
		Sitecore.Pipelines.HttpRequest.AliasResolver.Process(Sitecore.Pipelines.HttpRequest.HttpRequestArgs)
		DynamicClass.(System.Object, System.Object)
		Sitecore.Pipelines.CorePipeline.Run(Sitecore.Pipelines.PipelineArgs)
		Sitecore.Pipelines.DefaultCorePipelineManager.Run(System.String, Sitecore.Pipelines.PipelineArgs, System.String, Boolean)
		Sitecore.Pipelines.DefaultCorePipelineManager.Run(System.String, Sitecore.Pipelines.PipelineArgs, System.String)
		Sitecore.Web.RequestEventsHandler.OnPostAuthenticateRequest(System.Web.HttpContextBase)
		System.Web.HttpApplication+SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
		System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep)
		System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
		System.Web.HttpApplication+PipelineStepManager.ResumeSteps(System.Exception)
		System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, System.AsyncCallback)
		System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)
		System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
		System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)
		DomainNeutralILStubClass.IL_STUB_ReversePInvoke(Int64, Int64, Int64, Int32)
		[InlinedCallFrame]
		[InlinedCallFrame]
		DomainNeutralILStubClass.IL_STUB_PInvoke(IntPtr, System.Web.RequestNotificationStatus ByRef)
		System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
		System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)
		DomainNeutralILStubClass.IL_STUB_ReversePInvoke(Int64, Int64, Int64, Int32)
		[ContextTransitionFrame]
Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: key
Source: mscorlib
   at System.Collections.Concurrent.ConcurrentDictionary`2.TryGetValue(TKey key, TValue& value)
   at Sitecore.Caching.Generics.Cache`1.InnerBox.DoGetEntry(TKey key, Boolean updateAccessed)
   at Sitecore.Caching.Generics.Cache`1.GetValue(TKey key)
   at Sitecore.Caching.Generics.Cache`1.ContainsKey(TKey key)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.EnsureChildrenPrefetched(ID parentId, IDList childIds)
   at Sitecore.Data.DataProviders.Sql.SqlDataProvider.GetChildIDs(ItemDefinition itemDefinition, CallContext context)
   at Sitecore.Data.DataProviders.CompositeDataProvider.<DoGetChildIDs>d__94.MoveNext()
   at Sitecore.Common.EnumerableExtensions.ForEach[T](IEnumerable`1 sequence, Action`1 action)
   at Sitecore.Data.DataProviders.CompositeDataProvider.GetChildIDs(ItemDefinition itemDefinition, CallContext context)
   at Sitecore.Data.DataProviders.DataProvider.GetChildIDs(ItemDefinition item, CallContext context, DataProviderCollection providers)
   at Sitecore.Data.DataSource.GetChildIDs(ID itemID)
   at Sitecore.Nexus.Data.DataCommands.GetChildrenCommand.Execute(Item item)
   at Sitecore.Data.Engines.EngineCommand`2.Execute()
   at Sitecore.Data.Managers.ItemProvider.GetChildren(Item item, ChildListOptions options)
   at Sitecore.Data.Managers.ItemProvider.GetChildren(Item item, SecurityCheck securityCheck, ChildListOptions options)
   at Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(String[] parts, Int32 index, ItemList items)
   at Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(String[] parts, Int32 index, ItemList items)
   at Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(String[] parts, Int32 index, ItemList items)
   at Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(String itemPath, Database database)
   at Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.Execute(String itemPath, Database database)
   at Sitecore.Data.Engines.EngineCommand`2.Execute()
   at Sitecore.Data.Managers.ItemProvider.GetItem(String itemPath, Language language, Version version, Database database, SecurityCheck securityCheck)
   at Sitecore.Data.Managers.DefaultItemManager.GetItem(String itemPath, Language language, Version version, Database database)
   at Sitecore.Data.Managers.ItemManager.GetItem(String itemPath, Language language, Version version, Database database)
   at Sitecore.Resources.Media.MediaRequest.GetMediaPath(String localPath)
   at Sitecore.Resources.Media.MediaRequest.get_MediaUri()
   at Sitecore.Resources.Media.MediaProvider.ParseMediaRequest(HttpRequest request)
   at Sitecore.XA.Foundation.MediaRequestHandler.Pipelines.MediaRequestHandler.MediaRequestHandlerArgs..ctor(HttpContext context)
   at Sitecore.XA.Foundation.MediaRequestHandler.MediaRequestHandler.DoProcessRequest(HttpContext context)
   at Sitecore.Resources.Media.MediaRequestHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Leave a Reply

Your email address will not be published.