Copied to clipboard

Flag this post as spam?

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


  • Christian John Schmidt 9 posts 112 karma points
    21 days ago
    Christian John Schmidt
    0

    System.TimeoutException: Cannot acquire MainDom

    Hello Our

    We have an issue with a couple of our websites, which keeps randomly going down.

    The exception in the log is this:

    {"@t":"2024-09-24T22:00:04.2700471Z","@mt":"An unhandled exception occurred","@l":"Error","@x":"Umbraco.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.\n\n-> Umbraco.Core.Exceptions.BootFailedException: Boot failed.\n\n-> System.TimeoutException: Cannot acquire MainDom\n   at Umbraco.Core.Runtime.MainDom.Acquire() in D:\\a\\1\\s\\src\\Umbraco.Core\\Runtime\\MainDom.cs:line 172\r\n   at Umbraco.Core.Runtime.MainDom.<get_IsMainDom>b__16_0() in D:\\a\\1\\s\\src\\Umbraco.Core\\Runtime\\MainDom.cs:line 211\r\n   at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)\r\n   at Umbraco.Core.Runtime.MainDom.get_IsMainDom() in D:\\a\\1\\s\\src\\Umbraco.Core\\Runtime\\MainDom.cs:line 211\r\n   at Umbraco.Core.Runtime.CoreRuntime.AcquireMainDom(IMainDom mainDom) in D:\\a\\1\\s\\src\\Umbraco.Core\\Runtime\\CoreRuntime.cs:line 471\r\n   at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer) in D:\\a\\1\\s\\src\\Umbraco.Core\\Runtime\\CoreRuntime.cs:line 180\r\n   at Umbraco.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException) in D:\\a\\1\\s\\src\\Umbraco.Core\\Exceptions\\BootFailedException.cs:line 80\r\n   at Umbraco.Web.Composing.ModuleInjector`1.<>c__DisplayClass4_0.<Init>b__0(Object sender, EventArgs args) in D:\\a\\1\\s\\src\\Umbraco.Web\\Composing\\ModuleInjector.cs:line 44\r\n   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()\r\n   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)\r\n   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)","SourceContext":"Umbraco.Web.UmbracoApplicationBase","ProcessId":12492,"ProcessName":"w3wp","ThreadId":52,"AppDomainId":2,"AppDomainAppId":"LMW3SVC19ROOT","MachineName":"EC2AMAZ-PNTVJAN","Log4NetLevel":"ERROR","HttpRequestNumber":590,"HttpRequestId":"7b17e459-44a7-4d88-8e31-0bdf5fbc32dc"}
    

    My thought is that this is due to a timeout on the database server, however the database does not have any spikes or low ressource availability when this happens.

    Umbraco version is 8.18.13

    Any ideas on how to debug this further?

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    21 days ago
    Alex Skrypnyk
    0

    Hi Christian

    Do you have any logic that uses database heavily? Like ContentService.SaveAndPublish method?

    Alex

  • Christian John Schmidt 9 posts 112 karma points
    20 days ago
    Christian John Schmidt
    0

    Hi Alex

    Yes we do have one method that saves values to a textarea, whenever a specific type of document is saved.

    It's the .Save method we use - you think this could be the culprit?

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    19 days ago
    Alex Skrypnyk
    0

    Hi,

    Yes, I saw this issue when the save method was used heavily. Maybe you can avoid using it too much by rewriting the code.

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft