Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Andrew Lansdowne 43 posts 124 karma points
    Feb 22, 2012 @ 15:46
    Andrew Lansdowne

    Site stalls when distributedCall is enabled


    I have a simplified load balanced setup of Umbraco 4.5 running on two servers, the umbraco file system exists on both servers (not using SAN) and IIS is configured such with 1 site with host headers:


    • (both servers)
    • (server 1 only)
    • (server 2 only)


    The servers can access each other via these URLs and view the site. We have decided to access Umbraco directly via only. This setup works fine, but of course when you make changes in Umbraco they don't show up on www2 site. 

    So now I did this in the umbracoSettings.config on both servers:

      <distributedCall enable="true">

    This worked perfectly, and when I publish it updates on both servers.

    Then after a few days, it stopped working:


    • The sites stopped responding (just timing out) if you access them from any machine except the server (if you access on server 1 then its fine, but from any other machine it doesn't respond)
    • Errors in the event viewer on both servers indicating that it is timing out when trying to connect to itself to clear the cache:
      The request has been aborted.
      Exception message: Request timed out.
      Request URL:
      User host address: [IP OF SERVER X]
    • Lots of these 3 errors in the umbracoLog database:
    Error refreshing a node in the distributed list: 'System.Threading.ThreadAbortException: Thread was being aborted. . [ trimmed .... ]  at umbraco.presentation.cache.CacheRefresher.EndRefreshById(IAsyncResult asyncResult)
    Error refreshing distributed list: 'System.Threading.ThreadAbortException: Thread was being aborted.     at umbraco.presentation.cache.dispatcher.InvokeDispatchMethod(DispatchType dispatchType, Guid factoryGuid, Int32 numericId, Guid guidId)'
    At /umbraco/webservices/cacheRefresher.asmx (Referred by: ): 

    If I change distributedCall to 'false' then it all works fine again. Changing it back to 'true' and it works for a short time and then happens again. If I change it to 'true' on server 1 only, then server 1 starts stalling but server 2 is unaffected.

    Feel free to tell me this isn't a recommended setup, but if anyone knows how the distributedCall cache clearing works and has any idea why it would lock up the site..... that would be great!




  • Andrew Lansdowne 43 posts 124 karma points
    Dec 18, 2017 @ 17:33
    Andrew Lansdowne

    In case anyone had this I will post the answer.

    The problem was that I had distributedCall="true" on all the servers. It should only be "true" on the primary authoring server where Umbraco is used.

    There is a bug in Umbraco 4 where during the processing of distributed call in the remote server for Refresh by ID of a media item, it calls "library.ClearLibraryCacheForMedia(Id);" which does this:

    // umbraco.library
    public static void ClearLibraryCacheForMedia(int mediaId)
        if (UmbracoSettings.UseDistributedCalls)
            dispatcher.Refresh(new Guid("B29286DD-2D40-4DDB-B325-681226589FEC"), mediaId);

    So if you have distributed call enabled on the remote server it ends up calling itself in a never ending loop. I don't know at what point this changed but this is how it was in 4.5.0

  • Andrew Lansdowne 43 posts 124 karma points
    Dec 19, 2017 @ 10:21
    Andrew Lansdowne

    Actually, this helped, but there were still errors on the authoring server.

    Turns out this still had an infinite loop when saving media - fix is to not list the authoring server in the distributed calls config.

Please Sign in or register to post replies

Write your reply to: