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.
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.
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?
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.
DB created in Azure
Site created i VS2022 from Umbraco project template (Umbraco HQ).
Site developed locally, remote db. No Azure optimised settings.
Development slot created on existing Azure app service.
Site published (VS) to new slot. Tested - OK.
Slot swapped to production. Tested - OK.
Running fine a few days. Then site failed as described. Changed to Azure optimised settings. Tested - Failed
Tested locally (no source or settings changes) - Failed.
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?
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.
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.
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?
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.
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?
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.
is working on a reply...