Copied to clipboard

Flag this post as spam?

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


  • Fredrik 9 posts 80 karma points
    15 days ago
    Fredrik
    1

    Umbraco 7.10.4 Azure Load balancing problems

    Hi,

    We have setup a version of Umbraco for a customer but now having some problems with content update in a load balanced environment in Azure. We have followed all the guides but are still having issues. I wonder if someone could give us a second eye on this to see if we missed something.

    Deployment Setup:

    1. We have 2 web applications. One web application is load balanced with 2 nodes as static. The other web application (Backoffice) is single server, so to say.
    2. Both web applications have the same machine-key
    3. We use Redis session state
    4. We have added umbracoLocalTempStorage = EnvironmentTemp to all web.config's
    5. We have added directoryFactory="Examine.LuceneEngine.Directories.TempEnvDirectoryFactory,Examine" to the internal indexer in ExamineSettings.config
    6. We have set the umbracoApplicationUrl in umbracoSettings.config to https://admin.domain.com/umbraco

    The problem is that when the customer adds or updates content through the backoffice (/umbraco) on the second web application, the result is that the information is updated to only one node in the front.

    If I then go in and do a republish (/Umbraco/dialogs/republish.aspx?xml=true) it works like a charm...

    Does anyone have a suggestion on what could be wrong

    Thx for any help in advance!

  • Fredrik 9 posts 80 karma points
    15 days ago
    Fredrik
    0

    Hi again,

    I've done some more digging and found that the table umbracoCacheInstruction stores a log of all changes made. I know that every worker checks this table for the latest instruction and I assume that each worker stores a local file of which version the worker has processed.

    When I look in the file system of the site I find App_Data/Temp/DistCache. In here I find a file which ends with -lastsynced. But the problem is that when i open that file I find a number that is way off according to the db table.

    Very strange!?

  • Thomas 33 posts 126 karma points c-trib
    14 days ago
    Thomas
    0

    Hi Fredrik,

    There is a community package that you can install to help with debugging load balancing issues. Probably a good start: https://github.com/marcemarc/Our.Umbraco.Healthchecks.LoadBalancing

  • Fredrik 9 posts 80 karma points
    14 days ago
    Fredrik
    0

    Hi Thomas,

    Thx for the reply. I installed it on the back office and got no errors.. everything seems to be looking fine. I must wait until tonight to install in on the front ends since I dont want to disrupt the site during business hours.

    I was wondering where the environment temp folder is and how to access it without writing more code.. I just want to check the -lastsynced file on each worker.

  • Fredrik 9 posts 80 karma points
    1 week ago
    Fredrik
    0

    Ok,

    So I've installed the health check and I can see all 3 servers in the load balancing pool. The problem now is that content still isn't updating.

    Question: The UmbracoApplicationUrl should be set to the master server corret? If I have 2 web apps... on admin.domain.com and on www.domain.com that UmbracoApplicationUrl on all instances should be set to admin.domain.com/umbraco

    Just to be clear, right?!

  • andy 5 posts 74 karma points
    1 week ago
    andy
    0

    I'm having a really similar issue

    I have 4 app services (1 admin, 3 front end) on Azure. Front end servers sit behind a traffic manager. I have followed the load balancing docs and have configured the temp storage and examine etc. When publishing changes on the admin server, changes aren't pushing through to all servers. Restarting the servers 1 at a time seems to push the changes through.

    Have you got any further with diagnosing this?

  • Fredrik 9 posts 80 karma points
    1 week ago
    Fredrik
    0

    So I've updated to the admin.domain.com/umbraco.

    I still got issues that only one node is updating when the other is still keeping the old information.

    Any ideas?

  • andy 5 posts 74 karma points
    1 week ago
    andy
    0

    Hi Fredrik,

    I seem to have fixed this on my site.....

    The umbracoApplicationUrl had my admin server's HTTPS url but I had umbracoUseSSL set to false in the web.config. Changing umbracoUseSSL to true seems to have sorted it.

    Hope this helps fix yours!

    EDIT: Spoke too soon. Still having the issue!!

  • Fredrik 9 posts 80 karma points
    1 week ago
    Fredrik
    0

    Hi Andy,

    Thx for your reply. I have SSL set correctly ..I'm afraid.

    Do you point all your servers to the master umbraco application url or is it just the admin server?

  • andy 5 posts 74 karma points
    1 week ago
    andy
    0

    Ah hard luck

    All my servers have the umbracoApplicationUrl set to the URL of my admin server so https://{adminURL}.azurewebsites.net

  • Fredrik 9 posts 80 karma points
    1 week ago
    Fredrik
    0

    What I can see I've changed the following values (apart from standard installation)

    Web.config

    <add key="umbracoLocalTempStorage" value="EnvironmentTemp"/>
    <add key="umbracoUseSSL" value="true" />
    Settings for Redis session state
    

    ExamineSettings.config

    <Examine xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
    <ExamineIndexProviders>
      <providers>
        <add xdt:Transform="Replace" xdt:Locator="Match(name)" name="InternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
             supportUnpublished="true"
             supportProtected="true"
             analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"
             directoryFactory="Examine.LuceneEngine.Directories.TempEnvDirectoryFactory,Examine"/>
    
        <add xdt:Transform="Replace" xdt:Locator="Match(name)" name="InternalMemberIndexer" type="UmbracoExamine.UmbracoMemberIndexer, UmbracoExamine"
             supportUnpublished="true"
             supportProtected="true"
             analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"
             directoryFactory="Examine.LuceneEngine.Directories.TempEnvDirectoryFactory,Examine"/>
    
      </providers>
    </ExamineIndexProviders>
    

    umbracoSettings.config

    <web.routing xdt:Transform="Replace"
    trySkipIisCustomErrors="true"
    internalRedirectPreservesTemplate="false" disableAlternativeTemplates="false" disableFindContentByIdPath="false"
    umbracoApplicationUrl="https://admin.domain.com/umbraco">
    

    Non-changed values in web.config

    <umbracoConfiguration>
    <settings configSource="config\umbracoSettings.config" />
    <BaseRestExtensions configSource="config\BaseRestExtensions.config" />
    <FileSystemProviders configSource="config\FileSystemProviders.config" />
    <dashBoard configSource="config\Dashboard.config" />
    <HealthChecks configSource="config\HealthChecks.config" />
    

    Both front end servers and admin server has HTTP2 and force HTTPS enabled in Azure configuration.

    Any ideas would be very much appreciated :)

    // Fredrik

  • andy 5 posts 74 karma points
    1 week ago
    andy
    0

    I may have spoken too soon....looks like my issue is back :(

    I have pretty much the same settings as you

  • Fredrik 9 posts 80 karma points
    4 days ago
    Fredrik
    0

    Hi Andy,

    Did you get any further?

    I still have the same issue. Very annoying! I'm thinking about just setting up a blank site and see what "vanilla" settings there are. Then make the necessary changes and test, test, test...

    I'm getting gray hairs :)

Please Sign in or register to post replies

Write your reply to:

Draft