0

The issue

I have the Dynamic Sites module installed and configured on a single instance 8.1 (rev 160519). It runs fine most of the time. But as the customer is adding sites to it, once or twice a day. The site crashes out hard with the error below. The only thing that resolves the error is an IIS RESET or touching the web.config.

The config

The config is here to save space. https://gist.github.com/dnstommy/d72f89e4f7b48fc6d858fe290bddc679

What I know

The issue always is proceeded by a publish of a new site item. Many site items have been published and do not cause this issue. Its random, maybe a timing issue.

The error

5252 13:54:18 INFO AUDIT (sitecore\matthew): Publish item now: web:/sitecore/system/Modules/Dynamic Sites/Sites/Amite, language: en, version: 1, id: {478FF98A-3303-4D43-ABBE-9C5D97796003}

5252 13:54:18INFO AUDIT (sitecore\matthew): [Publishing]: Starting to process 1 publishing options

10140 13:54:19 ERROR Application error. Exception: System.NullReferenceException Message: Object reference not set to an instance of an object. Source: Sitecore.Kernel at Sitecore.Sites.SiteContextFactory.GetSites() at Sitecore.ExperienceExplorer.Business.Helpers.SettingsHelper.IsEnabledForSite(String siteName) at Sitecore.ExperienceExplorer.Business.Helpers.PageModeHelper.get_IsExperienceMode() at Sitecore.ExperienceExplorer.Business.Pipelines.HttpRequestProcessed.RetrieveRenderingsPipeline.Process(HttpRequestArgs args) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Nexus.Web.HttpModule.(Object , EventArgs ) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

9408 13:54:19 ERROR Application error. Exception: System.NullReferenceException Message: Object reference not set to an instance of an object. Source: Sitecore.Kernel at Sitecore.Sites.SiteContextFactory.GetSites() at Sitecore.Sites.SiteContextFactory.GetSiteContext(String hostName, String fullPath, Int32 portNumber) at Sitecore.Pipelines.HttpRequest.SiteResolver.ResolveSiteContext(HttpRequestArgs args) at Sitecore.Pipelines.HttpRequest.SiteResolver.Process(HttpRequestArgs args) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Nexus.Web.HttpModule.(Object , EventArgs ) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Publishing error at the same time.

5252 13:54:19 ERROR An error during Publish Pipeline Process Queue execution. Exception: System.NullReferenceException Message: Object reference not set to an instance of an object. Source: Sitecore.Kernel at Sitecore.Sites.SiteContextFactory.GetSites() at Sitecore.Sites.SiteContextFactory.GetSiteNames() at Sitecore.Configuration.Factory.GetSiteInfoList() at Sitecore.Caching.ItemCache.RemoveItemFromFilterCaches(ID itemId) at System.EventHandler 1.Invoke(Object sender, TEventArgs e) at Sitecore.Data.Engines.EngineCommand 2.RaiseEvent[TArgs](EventHandler 1 handlers, Func 2 argsCreator) at Sitecore.Data.Engines.EngineCommand 2.Execute() at Sitecore.Data.Engines.DataEngine.SaveItem(Item item) at Sitecore.Data.Managers.ItemProvider.SaveItem(Item item) at Sitecore.Data.Managers.PipelineBasedItemProvider.ExecuteAndReturnResult[TArgs,TResult](String pipelineName, String pipelineDomain, Funcc1 pipelineArgsCreator, Func 1 fallbackResult) at Sitecore.Data.Managers.PipelineBasedItemProvider.SaveItem(Item item)
at Sitecore.Data.Items.ItemEditing.AcceptChanges(Boolean updateStatistics, Boolean silent) at Sitecore.Data.Items.EditContext.Dispose() at Sitecore.Publishing.PublishHelper.CopyToTarget(Item sourceVersion)
at Sitecore.Publishing.PublishHelper.PublishVersionToTarget(Item sourceVersion, Item targetItem, Boolean targetCreated) at Sitecore.Publishing.Pipelines.PublishItem.PerformAction.Process(PublishItemContext context) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Publishing.Pipelines.PublishItem.PublishItemPipeline.Run(PublishItemContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context, List 1& referrers, List`1& children)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable 1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable 1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.Process(PublishContext context)

I turned off auto publish in the dynamic sites config and I got this error after an hour.

enter image description here

  • Base on the stacktrace, it gets null reference when while performing publishing, right? – Hishaam Namooya Mar 20 '17 at 19:10
  • @HishaamNamooya Yes it does. I added the publishing error to the question above. – Chris Auer Mar 20 '17 at 19:23
  • @MarekMusielak Thats does not. The latest config has the website config in it now, labeled as disable.local. – Chris Auer Mar 20 '17 at 19:24
  • I haven't used the Dynamic Sites module but what I can say is that the list of SiteInfo is empty. Now, Sitecore tries to get the list of Sites using the SiteManager.GetSites().It may be that Sitecore cannot see the Sites hence returning null. Because there is not null check on the foreach from the Sitecore.Kernel.dll. Reason why it is working sometimes is because the SiteInfo list is not null. Maybe increasing the cache may help – Hishaam Namooya Mar 20 '17 at 19:35

Your Answer

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

Browse other questions tagged or ask your own question.