Copied to clipboard

Flag this post as spam?

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


  • Arthur 4 posts 24 karma points
    Oct 02, 2013 @ 05:03
    Arthur
    0

    Umbraco 6 distributed call, can't ping itself on startup

    Hello,

    We are currently using umbraco 6.1.1 on a load balanced environment. We have one authoring server and two production servers.

    the umbracosettings.config is set like this on the authorig server... the prod servers don't have distributed call enabled.

      <distributedCall enable="true">

        <user>0</user>

        <servers>

    <server>web1</server>

    <server>web2</server>

        </servers>

      </distributedCall>

     

    It works fine this way... The problem is that when I add the authoring server to the loop (<server>auth</server>), there is no way to restart the authoring server.

    After investigation, the process appears to freeze at this point

    INFO  Umbraco.Core.Sync.DefaultServerMessenger - [Thread 51] Submitting calls to distributed servers

    Indeed it is trying to access the page 

    /umbraco/webservices/CacheRefresher.asmx

    but this page is not accessible because it is waiting for the startup process to finish, which is waiting for the page to be available.... blabla

    Any workaround or person who had this issue before?


  • Tristan Thompson 5 posts 71 karma points c-trib
    Oct 10, 2013 @ 18:38
    Tristan Thompson
    0

    I seem to be having the same issue - did you ever solve it?

  • Arthur 4 posts 24 karma points
    Oct 11, 2013 @ 02:51
    Arthur
    0

    We just solved it by patching the source code: 

    on Umbraco.Core\Sync\DefaultServerMessenger.cs

     

    the original code was:

    if (!_useDistributedCalls || !servers.Any())

                {

                    //if we are not, then just invoke the call on the cache refresher

                    InvokeMethodOnRefresherInstance(refresher, dispatchType, getId, instances);

                    return;

                }

    we changed it this way:

    InvokeMethodOnRefresherInstance(refresher, dispatchType, getId, instances);

    if (!_useDistributedCalls || !servers.Any())

                {

                   return;

                }

    (need to be done twice in the file)

    what it is doing now is that the authoring server publish on his cache anyway, and then if required, start the distributed call.

    then on the umbracosettings.config:

    <distributedCall enable="true">

        <user>0</user>

        <servers>

    <server>web1</server>

    <server>web2</server>

        </servers>

      </distributedCall>

    note that the authoring server is not pinging itself now but will be refreshed as if the distributed call was disabled.

    The solution is not perfect because you might not want to refresh you authoring server.

    Any comments?

  • Tristan Thompson 5 posts 71 karma points c-trib
    Oct 17, 2013 @ 17:48
    Tristan Thompson
    0

    Thanks for that - I tried fix but it didn't seem to work for us.  In the end I had to write my own distributed call by hooking into some publishing events and calling URLs on the other servers to initiate a cache refresh.

    Did you raise an bug with the devs?

  • Arthur 4 posts 24 karma points
    Oct 17, 2013 @ 21:52
    Arthur
    0

    Just added it http://issues.umbraco.org/issue/U4-3189 my changes of the source code are attached

  • Tristan Thompson 5 posts 71 karma points c-trib
    Oct 18, 2013 @ 10:06
    Tristan Thompson
    0

    Nice one :)

Please Sign in or register to post replies

Write your reply to:

Draft