Question

I have setup my Sitecore installation to two different IIS Sites. One has all of the Sitecore Admin files and the other one has a clean web only files sharing the same Web.config, and my Data folder is outside of both folders.

-Sitecore.Data --Licenses and Logs -Sitecore.Admin --Sitecore (folder with files) -Sitecore.Web --html,css, and js files

The problem I am running into is that after I do a publish from Sitecore.Admin folder, the Sitecore.Web doesn't update with the changes unless I recycled the app pool for Sitecore.Web. I tried to add a task for recycle the app pool programmatically, but had no success.

    <processor type="MySite.Sitecore.Publishing.IISReset, MySite.Sitecore" />

Any suggestion on how to propagate the changes from one IIS node to the other one. I think the problem is that the HtmlCacheClearer is run for the Sitecore.Admin Node, but not for the other one.

Was it helpful?

Solution

You need to enable the EventQueues.

The EventQueues propagates the different events, like publishing, item saved etc. to the frontend servers.

Basically you need to rename a config file.

/App_Config/Include/ScalabilitySettings.config.example to ScalabilitySettings.config

That config file enables the event queue, and some other configurations.

I recommend reading the Sitecore Scaling guide.

http://sdn.sitecore.net/Reference/Sitecore%206/Scaling%20Guide.aspx

OTHER TIPS

Just like dunston said, make sure that ScalabilitySettings.config file is configured right

  • By enabling EventQueue
  • And making sure that instance name on Content Delivery server is Unique per server, like 'MachineName-CD1, MachineName-CD2'.

And make sure that HtmlCacheClearer event is added for your website name on PublishEnd:Remote event.

Besides enabling event queue like dunston said, also make sure that your website name is added to the publish:end and publish:end:remote HtmlCacheClear events, if you are using a different site then the default "website" otherwise you Html cache doesn't get cleared at all after a publish.

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

By publishing though, it sounds like you are possibly talking about deploying new code and you want it to trigger an application pool restart across multiple web servers, regardless? If that is the case, you could add something like this to the logic of that Publishing.IISReset that you built. It could connect to your various public-facing only instances and execute something like:

appcmd recycle apppool sitecore6

This will obviously restart Sitecore on those boxes and cause all the caches to reset completely, free of doubt.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top