Copied to clipboard

Flag this post as spam?

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


  • Jesper Weber 54 posts 170 karma points c-trib
    Dec 22, 2021 @ 12:00
    Jesper Weber
    0

    Boot failed. System.TimeoutException: Cannot acquire MainDom

    Hi,

    We have a 8.16.0 Umbraco site running on virtual servers in a load balanced setup, on-premise and no Azure.

    We have one server for the Umbraco backoffice and two frontend servers with a load balancer in front. Just like the setup here: enter image description here

    https://our.umbraco.com/Documentation/Fundamentals/Setup/Server-Setup/Load-Balancing/index-v8#how-umbraco-load-balancing-works Occasionally the frontend sites gets a Boot failed error and a manual restart of the site is required.

    Umbraco.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.
    
    -> Umbraco.Core.Exceptions.BootFailedException: Boot failed.
    
    -> System.TimeoutException: Cannot acquire MainDom
       at Umbraco.Core.Runtime.MainDom.Acquire() in D:\a\1\s\src\Umbraco.Core\Runtime\MainDom.cs:line 172
       at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
       at Umbraco.Core.Runtime.MainDom.get_IsMainDom() in D:\a\1\s\src\Umbraco.Core\Runtime\MainDom.cs:line 211
       at Umbraco.Core.Runtime.CoreRuntime.AcquireMainDom(IMainDom mainDom) in D:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 460
       at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer) in D:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 185
       at Umbraco.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException) in D:\a\1\s\src\Umbraco.Core\Exceptions\BootFailedException.cs:line 64
       at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    

    I believe we have followed the guide from the link above.

    Anyone knows why this happens and what we might be missing?

  • Corné Hoskam 80 posts 587 karma points MVP 2x c-trib
    Dec 22, 2021 @ 14:51
    Corné Hoskam
    0

    Hi Jesper,

    When working with load-balanced setups, there are two differences in Configs that I/we would make between the Umbraco Backoffice server and the Frontend servers.

    The first one would be that both type of servers use the following config/transform on their web.config:

    <add xdt:Transform="Insert"
         key="Umbraco.Core.MainDom.Lock" value="SqlMainDomLock" />
    
    <add xdt:Transform="Insert"
         key="Umbraco.Core.LocalTempStorage" value="EnvironmentTemp" />
    

    And second we make a difference in the Examine config, in which the Backoffice Server uses the following web.config transform:

    <add xdt:Transform="Insert"
         key="Umbraco.Examine.LuceneDirectoryFactory" value="Examine.LuceneEngine.Directories.SyncTempEnvDirectoryFactory, Examine" />
    

    and the Frontend servers use the following web.config transform:

    <add xdt:Transform="Insert"
         key="Umbraco.Examine.LuceneDirectoryFactory" value="Examine.LuceneEngine.Directories.TempEnvDirectoryFactory, Examine" />
    

    I hope these configs help you resolve your issue!

    Kind regards,

    Corné Hoskam

  • Jesper Weber 54 posts 170 karma points c-trib
    Dec 22, 2021 @ 15:09
    Jesper Weber
    0

    Hi Corné,

    Thanks for the reply.

    You might be correct about the settings, I've been looking at the same settings, however I only found these settings mentioned in the documentation for Load Balancing Azure Web Apps and our site is not running in Azure. https://our.umbraco.com/Documentation/Fundamentals/Setup/Server-Setup/Load-Balancing/azure-web-apps-v8

    Can I just assume that these settings are the same for on-premise hosting or do you have a link to the documentation for non-Azure?

  • Corné Hoskam 80 posts 587 karma points MVP 2x c-trib
    Dec 22, 2021 @ 15:15
    Corné Hoskam
    0

    Hi Jesper,

    Sadly both the documentation and Load Balancing training course mention these properties specifically within the context of load balancing using Azure, and I cannot speak from experience on any on-premise load balanced options. I would however say that it's worth trying out as, while these settings are usually referred to within the concepts of Azure, don't specify themselves to be Azure only, so my best guess would be that these also work on on-premise setups!

    I would love to hear back from you if these also function within non-Azure environments! 😄

Please Sign in or register to post replies

Write your reply to:

Draft