Copied to clipboard

Flag this post as spam?

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


  • Gavin Williams 29 posts 159 karma points
    Jan 31, 2022 @ 10:16
    Gavin Williams
    0

    Nucache.content.db still being locked by another process

    I know this has been asked before regarding a locking problem with nucache.content.db being locked by another process - threads here:

    Umbraco crashes from time to time and Github issue

    These articles suggest this issue has been resolved - the github issue has been closed.

    We have tried setting the WEBSITEDISABLEOVERLAPPED_RECYCLING to 1 in Azure but this does not appear to have fixed the issue.

    Is anyone else still experiencing this issue (we're in a load balanced Azure environment) or were otherwise able to resolve the issue? Umbraco v8.16.0

    Thanks

  • Jeavon Leopold 3055 posts 13417 karma points MVP 9x admin c-trib
    Jan 31, 2022 @ 11:59
    Jeavon Leopold
    0

    What path does it say is locked?

  • Gavin Williams 29 posts 159 karma points
    Jan 31, 2022 @ 12:05
    Gavin Williams
    0

    From the Umbraco logs:

    System.IO.IOException: The process cannot access the file 'D:\local\Temp\UmbracoData\13efb01c5549450c3e5464f2625c8507\NuCache\NuCache.Content.db' because it is being used by another process.

  • Jeavon Leopold 3055 posts 13417 karma points MVP 9x admin c-trib
    Jan 31, 2022 @ 12:33
    Jeavon Leopold
    0

    And you see this when the application is migrating to a new host?

  • Jeavon Leopold 3055 posts 13417 karma points MVP 9x admin c-trib
    Jan 31, 2022 @ 12:57
    Jeavon Leopold
    0

    Also, do you use applicationInitialization?

  • Gavin Williams 29 posts 159 karma points
    Jan 31, 2022 @ 15:10
    Gavin Williams
    0

    This could prove to be a red herring. I've just discovered from our server guys our load balancing was configured to reduce to 1 instance overnight, then scale back up to 2 instances at 6am each morning (no idea why that was done). This rule has now been removed so the site will sit at 2 instances unless it needs to scale up.

    So it appears that occasionally when the new instance is started up it gets confused and results in the lock e.g. in log file this is the sequence of events

    1. No last synced Id found, this generally means this is a new server/install,

    2. Exception. The thread has been aborted, because the request has timed out. System.Threading.ThreadAbortException: Thread was being aborted at SNIReadSyncOverAsync

    3. Panic, exception while loading cache data. System.InvalidOperationException: Invalid operation. The connection is closed at System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute

    4. Then from this point onwards. System.IO.IOException: The process cannot access the file.... NuCache.Content.db because it is being used by another process

    So for now this scale down rule has been removed, I'll see if we get any further occurrences of this error.

  • Jeavon Leopold 3055 posts 13417 karma points MVP 9x admin c-trib
    Jan 31, 2022 @ 16:16
    Jeavon Leopold
    0

    Interesting, was it scale down or up to both that triggered the error?

  • Gavin Williams 29 posts 159 karma points
    Jan 31, 2022 @ 16:31
    Gavin Williams
    0

    Scale up I believe, I can see at 7am each morning in the log file for the newly spun up replica the "No last synced Id found" message. So most of the time it appears to scale back up ok, but occasionally it goes into meltdown and then results in the file lock, as happened over the weekend (log file was massive so has been deleted unfortunately). The last time this happened was 13th Jan, I have the complete log file for that one which shows it was during scale up.

Please Sign in or register to post replies

Write your reply to:

Draft