More in this section
Forums / Bugs & Issues / Sitemap synchronization in web farm

Sitemap synchronization in web farm

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Mike Ripplinger
    Mike Ripplinger avatar
    10 posts
    11 Sep 2008
    16 Jun 2010
    Link to this post
    We have two web servers -- Web1 and Web2 -- both running Sitefinity.  Each web server has its own MySQL server and those two MySQL servers are replicating their data (Web1 to Web2).  We make all Sitefinity changes on Web1 so that the database changes will be applied to Web1 and then propogated to Web2 per a standard MySQL master/slave replication scenario.  Caching has been changed in web.config to "InDatabase" on both servers.  We also have third-party software running to synchronize the contents of the folder where Sitefinity is installed (C:\Sitefinity) from Web1 to Web2.

    I am confident the database replication is working because if I create a new page on Web1 via Sitefinity, it is immediately available on Web2 if I type its URL directly into my web browser.  I am also confident that the file replication is working because when I upload a new file to Web1 via FTP, such as a CSS file, the changes made to the file are quickly (within 30-60 seconds) also seen on Web2.

    Here's the problem: when I create a new page on Web1, it is immediately available on Web2 if I type its URL into my web browser, as I stated above.  It also immediately appears in the SiteMenu on our pages on Web1.  But it never shows up in the SiteMenu on Web2.  The only way I've found to make it show up on Web2 is to recycle Web2's AppPool.  Then the menu item appears.

    Any ideas on what could be causing this problem and how to ensure that pages show up in the SiteMenu on both web servers as soon as they are created on Web1?
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    18 Jun 2010
    Link to this post
    Hello Mike Ripplinger,

    Thank you for using our services.

    The SiteMenu control is bound to a SiteMap provider. The SiteMap provider however does not get the values it has to use from the Sitefinity caching. It uses the HttpRuntime.Cache. One of the methods is to overcome this is to clear the runtime cache, it is cleared when the application is restarted. Or use HttpRuntime.Cache.Remove() to remove cache dependencies from the runtime cache.

    Other options are to set your Web Servers use the same files (hosted on a network share) and connect to the same db.

    You can also use code from this forum thread to create a site menu which is not bound to SiteMapProvider but gets the pages from Sitefinity's API: Manager.GetPages sorting based on ordinal.

    Kind regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered