Copied to clipboard

Flag this post as spam?

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


  • Ben Dickman 21 posts 103 karma points
    Sep 13, 2024 @ 08:15
    Ben Dickman
    0

    DISTRIBUTED CACHE IS NOT UPDATED - missing content

    Hi all,

    I am running Umbraco 13.3.2 in Azure with the following configurations based on https://docs.umbraco.com/umbraco-cms/v/13.latest-lts/fundamentals/setup/server-setup/load-balancing/azure-web-apps

    Admin instance:

    • MainDomLock = FileSystemMainDomLock
    • LocalTempStorageLocation = EnvironmentTemp
    • LuceneDirectoryFactory = SyncedTempFileSystemDirectoryFactory

    Public instance:

    • MainDomLock = FileSystemMainDomLock
    • LocalTempStorageLocation = EnvironmentTemp
    • LuceneDirectoryFactory = TempFileSystemDirectoryFactory

    The issue I am facing is content just disappears. Tabs go missing and text fields that did contain values are now empty.

    A restart of the Azure App Services restores the data but clearly this isn't ideal.

    The logs indicate the following:

    Error Log 1

    Microsoft.Data.SqlClient.SqlException (0x80131904): Lock request time out period exceeded.

    Error Log 2

    Umbraco.Cms.Core.DistributedLocking.Exceptions.DistributedWriteLockTimeoutException: Failed to acquire write lock for id: -331.

    Error Log 3

    DISTRIBUTED CACHE IS NOT UPDATED

    Microsoft.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 83) was deadlocked on lock resources with another process and has been chosen as the deadlock victim.

    Error Log 4

    System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.

    And then the subsequent errors are all related to the missing content.

    Does anyone have any ideas what is going on?

    Many thanks,

    Ben

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Sep 13, 2024 @ 10:07
    Jeavon Leopold
    0

    Hi Ben,

    Have you checked the performance of your Azure SQL server, this error generally occurs when the SQL Server is out of resources.

    There are 2 settings you can adjust to allow more time before these errors occur, they go within Umbraco:CMS:Global

       "DistributedLockingReadLockDefaultTimeout": "00:01:00",
      "DistributedLockingWriteLockDefaultTimeout": "00:00:05",
    

    You can find them in https://docs.umbraco.com/umbraco-cms/reference/configuration/globalsettings

    It's also worth checking if you have any custom code using the DB to ensure it's using IScopeProvider and potentially also a lock https://docs.umbraco.com/umbraco-cms/reference/distributed-locks

    It maybe also be that you have a package installed that may be reading or writing to the DB incorrectly, so it might be worth auditing what's installed.

    Jeavon

  • Ben Dickman 21 posts 103 karma points
    Sep 16, 2024 @ 09:13
    Ben Dickman
    0

    Thanks Jeavon, I will give these a try.

Please Sign in or register to post replies

Write your reply to:

Draft