1

We have hosted Sitecore 8.1 website on two server node1 and node2 where request redirection is handled by Load balancer. While deployment we delete App_config, Assets and Areas folder and copy-paste/replace all files so assuming we have same code on both server.

Still we are facing caching issue on node1 even configuration is same. While publishing every time we have to clear cache on node1 ( /sitecore/admin/cache.aspx ) because published content is not displayed on node1. Don't have any issue on node2.

-----------------UPDATE 02/13------------------------

We have following patch files on both node

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <events timingLevel="custom">
      <event name="publish:end">
        <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
          <sites hint="list">
            <patch:delete />
          </sites>
          <sites hint="list">
            <site>website1</site>
            <site>website2</site>
           </sites>
        </handler>
      </event>
      <event name="publish:end:remote">
        <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
          <sites hint="list">
            <patch:delete />
          </sites>
          <sites hint="list">
            <site>website1</site>
            <site>website2</site>
          </sites>
        </handler>
      </event>
    </events>
  </sitecore>
</configuration>
2
  • Few questions: 1.On Publish, sitecore would clear cache & may i know why are you clearing in explicitly again ( any custom logic behind) ? 2. On Publish, are you publishing content to both Node1 & Node2 (CD or CM) instances ? Feb 13, 2017 at 7:29
  • Can you please provide how you are configuring your ScalabilitySettings.config file? You can find this in App_Config/Include/ScalabilitySettings.config. Specifically, please let me know how you are handling the Sitecore Setting InstanceName on each node server. Feb 14, 2017 at 3:15

2 Answers 2

3

Go to the sitecore/admin/showconfig.aspx and check if you have the following entry in there:

<event name="publish:end:remote">
    <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
        <sites hint="list">
            <site>website</site>
            <site>website2</site>
        </sites>
    </handler>
</event>

If you don't have this entry in place, this means that you have to configure your automated cache clearing.

Please, follow the steps from this community guide on how to set up the automated cache clearing correctly: https://community.sitecore.net/technical_blogs/b/sitecorejohn_blog/posts/clear-output-caches-for-all-managed-sites-after-publication-with-the-sitecore-asp-net-cms

1
  • yeah we have this config....please see updated post...
    – Sukhjeevan
    Feb 14, 2017 at 3:04
1

Scalability Setting Issues are Common Cause for Event Misfires on Content Delivery Servers

On Content Delivery servers, especially when more than one are in play, it is a requirement, that the InstanceName Sitecore Setting is unique for each Content Delivery Server.

Sitecore uses the instance name to determine whether or not a server needs to act on any given events that are collected. In the event that both Content Delivery servers are being given the same InstanceName, when one server receives the event, it writes it's instance back to the EventQueue table in the Core database. If the second server, of same Instance Name, attempts to check EventQueue for work, it'll see that it already processed that event, and thus will not act on it.

To Resolve

  1. Make sure the ScalabilitySettings.config is enabled.
  2. Ensure One of the Following is True
    • Ensure that the InstanceName Sitecore Setting found in App_Config/Include/ScalabilitySettings.config is unique and different on both Content Delivery Servers.
    • If InstanceName is left blank, it will utilize MACHINENAME\IISSITENAME or the Azure App Service resolved name for the instance.
9
  • I checked through /admin/showconfig.aspx and found following entry <setting name="InstanceName" value=""/> Do I need to have two separate ScalabilitySettings.config file even you mentioned that in case InstanceName is blank it will use MACHINENAME\IISSITENAME to identify each server
    – Sukhjeevan
    Feb 14, 2017 at 4:02
  • No, only one ScalabilitySettings.config one each server will be fine. If the InstanceName is blank, then it will use a combination of machinename and iissite name. Check the Core database, and Select Top 2000 rows from EventQueue Table. Locate the InstanceName Column, and validate how many different server names you see showing up. If you only see 1 Content Delivery Server in that table, there may be a communication issue with the Core database, network connectivity, or the machine names are identical. Feb 14, 2017 at 4:31
  • Ok for that I have to talk to Infra team. As I mentioned we have ScalabilitySettings.config on each server also. Because we are facing caching issue so definitely there is something wrong. If there is communication issue or machine name is same so what should be the next debug steps for me.
    – Sukhjeevan
    Feb 14, 2017 at 5:07
  • I would start be inspecting the core database, and see what events are going into the EventQueue table, and what InstanceName's are being recorded. Second, verify that "website1" and "website2" are configured on both CD servers. 3rd, ensure you see events from the CM server in EventQueue. A network issue is probably not the case, but you do need to make sure both CD's are looking at the same core and web database. Feb 14, 2017 at 5:24
  • I checked top 2000 row and found following InstanceName count in sitecore_core db: CM01-CMWebSite = 1905 CD01-CDWebsite = 22 CD02-CDWebsite = 74 EventName following: Sitecore.Configuration.ClientDataStore+DataUpdatedRemoteEvent, Sitecore.Kernel Sitecore.ContentSearch.Events.IndexingFinishedEvent, Sitecore.ContentSearch Sitecore.ContentSearch.Events.IndexingStartedEvent, Sitecore.ContentSearch Sitecore.Data.Eventing.Remote.PropertyChangedRemoteEvent, Sitecore.Kernel Sitecore.Data.Eventing.Remote.PropertyRemovedRemoteEvent, Sitecore.Kernel
    – Sukhjeevan
    Feb 14, 2017 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.