Copied to clipboard

Flag this post as spam?

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


  • Jon Ivar Nielsen 24 posts 96 karma points
    Jun 22, 2023 @ 21:42
    Jon Ivar Nielsen
    0

    NuCache.Content.db is locked. Site is not rendering.

    I have a new 11.3 site that went in production a few weeks ago. Small site with Norwegian an English language. A few days ago we started to get HTTP 500 error. The error message was; The process cannot access the file 'D:\local\Temp\UmbracoData\c68bb392822f8bbb4b3ab3ae0f3ce01fc3c61c09\NuCache\NuCache.Content.db' because it is being used by another process.

    This site is running as an Azure App Service. I updated appsettings.json as described on the "Running Umbraco On Azure Web Apps" page. Same problem and restarting the app service, does not help. Tried to rollback both db and source to see if I could get it running again. Consistently the same problem.

    I tried to configure NuCache to work in memory only (https://docs.umbraco.com/umbraco-cms/reference/configuration/nucachesettings#additional-settings) and the error message changed but the site would still not run.

    Switching to a Umbraco db from a different site, removed all errors so the current db seems to trigger the problem. Using the current db I can access the Umbraco admin and the content tree is visible but node access failed.

    The site is created from Umbraco nuget package in Visual studio (2022) and published from VS to Azure. I now have the same problem when running the site locally from VS in IIS Express (same db in Azure).

    I can not isolate the problem and any help is appreciated.

    Umbraco log viewr

  • Simon Napper 116 posts 370 karma points
    Jun 23, 2023 @ 08:06
    Simon Napper
    0

    Could it be related to the performance of your SQL server and/or Umbraco's ability to connect? I have seen instances where this error has occurred when SQL server is maxed out for some reason and this stops Umbraco from getting a clean connection (as it times out) which in turn leads to a messy state with the processes grabbing the NuCache. Might explain why switching databases has an effect if you're resetting the connection?

    Not sure about your Azure setup, but are you ramping up and down with your at all? Could this be a result of switching up and down between the number of instances?

  • Jon Ivar Nielsen 24 posts 96 karma points
    Jun 23, 2023 @ 09:57
    Jon Ivar Nielsen
    0

    Thank you Simon.

    Never had any issues with the SQL server performance (Azure). Both db's is in the same elastic pool and the the problem is only connected to one of them.

    Here is the chain of events.

    1. DB created in Azure
    2. Site created i VS2022 from Umbraco project template (Umbraco HQ).
    3. Site developed locally, remote db. No Azure optimised settings.
    4. Development slot created on existing Azure app service.
    5. Site published (VS) to new slot. Tested - OK.
    6. Slot swapped to production. Tested - OK.
    7. Running fine a few days. Then site failed as described. Changed to Azure optimised settings. Tested - Failed
    8. Tested locally (no source or settings changes) - Failed.
    9. Tried another working Umbraco db, locally and remote. Tested both - OK.

    It seems the original db now has some content/settings that trigger this error. Any suggestion how to "clean" the db to get the site running again?

  • Jon Ivar Nielsen 24 posts 96 karma points
    Jun 26, 2023 @ 14:04
    Jon Ivar Nielsen
    0

    I was able to install uSync and export all necessary items from the original db. A new Umbraco 11 project was created with a new db. uSync was used to import everything. I updated the connection string in the original project with the new db and the site came back online with no errors.

    What went wrong? Still not sure but missing Azure optimised setting when initially deployed may have caused the site to fail. Maybe when the Azure app service restarted on another server after some time.

Please Sign in or register to post replies

Write your reply to:

Draft