Sitecore Version:

8.0 rev. 150621 (8.0 Update-4)


There were actually 2 issues.
  • There was once user removed a page test from homepage on authoring server. After a while, the homepage on delivery instance went down and was giving 500 errors with this exception in the logs:
7092 2016:05:03 18:12:32 ERROR Application error.
Exception: System.Web.HttpUnhandledException
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception

Exception: System.InvalidOperationException
Message: The specified variable does not exist in the test set
Source: Sitecore.Analytics
at Sitecore.Analytics.Testing.TestCombination.GetValue(Guid variableId)
at Sitecore.Analytics.Pipelines.InsertRenderings.Testing.Test(List`1 renderings, RenderingReference rendering, Item contextItem, Item variableItem)
at Sitecore.Analytics.Pipelines.InsertRenderings.Testing.Evaluate(InsertRenderingsArgs args, Item contextItem)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.RenderLayout.InsertRenderings.Process(RenderLayoutArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Layouts.PageContext.BuildControlTree(Object sender, EventArgs e)
at System.Web.UI.Page.PerformPreInit()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

          The issue was later resolved when app pool was restarted and never happened since, so nobody dug into it.
  • Recently users found that A/B testing(or MVT testing) doesn't work on the website. After they set it up in Authoring instance, you can see the tests from authoring urls, but on delivery instance urls, nothing happens, and after about a day, they started to work on delivery instances.(Which I think it must be the cache was cleared for some reason, maybe app pool scheduled recycle.)


In short, the cache ActiveTests is not being cleared on Delivery instance. In Sitecore.ContentTesting.config. ActiveTestCacheClearer handler is defined to clear cache for "publish:end" event but not "publish:end:remote":

<event name="publish:end">
    <handler type="Sitecore.ContentTesting.Events.ActiveTestCacheClearer, Sitecore.ContentTesting" method="Process"/>


Add the handler to "publish:end:remote" to Sitecore.ContentTesting.config:

<event name="publish:end:remote">
    <handler type="Sitecore.ContentTesting.Events.ActiveTestCacheClearer, Sitecore.ContentTesting" method="Process"/>


Keep reading if you want to know more about my experience on this one.
To me this felt like a big issue because delivery instance would always face issues with testing. So I checked and make sure this is issue with Sitecore out-of-box configurations, which is 8.0 rev. 150621 (8.0 Update-4). Then I checked few more version, the issue has been fixed starting from Sitecore 8.0 rev. 151127. And in the latest 8.1 versions, comments are added as well for more clarity.
Found a good cache debugging plugin while investigating: Sitecore Cache Admin, it shows all the cache and you can clear individual ones.
May the force be with you!
blog comments powered by Disqus