Umbraco won't start: "Missing cmsContentNu published content consider rebuilding" - but cannot rebuild because of lock
My local dev version of Umbraco (running 10.6.1) is failing to start and the message I get is Fatal Panic, exception while loading cache data.
System.InvalidOperationException: Missing cmsContentNu published content for node 1059, consider rebuilding.
A little later we see a second fatal exception: Fatal, An error occurred starting the application
System.AggregateException: One or more errors occurred. (The process cannot access the file 'Temp\UmbracoData\abcdefghij\NuCache\NuCache.Content.db' because it is being used by another process.)
I can access the back-end but when I go to the rebuild cache I get the same message about not being able to access the cache and all of the "reload" buttons are greyed out.
Sure enough in my Temp\UmbracoData\abcdefghij\ folder I can see a MainDom_949392391abcdafd123121.lock file which I assume is keeping anything from trying to rebuild the cache. I can't kill the lock because IIS is keeping it open. I can delete it if I kill IIS, but when I start again it just recreates it.
This build is stable on other machines and it was running fine on mine until I ran some tests connecting to another database yesterday and then switched back.
I have deleted my whole 'Temp\UmbracoData\abcdefghij folder and it gets rebuilt with the lock file that then sticks in place.
My current assumption is that this is a problem with some part of my local cache configuration - can I manually purge all the caches and force Umbraco to rebuild everything on start-up? Alternatively can I find a way to force it to unlock the caches so they can be rebuilt from within the system?
Investigating more, what I think is happening is that our application is trying to access node data while the cache is still rebuilding. When this fails it causes the initial request to fall over in a way that also kills the cache rebuild, leaving the lock file in place.
I believe that these are being triggered by an UmbracoStartedNotificationListener - does Umbraco consider itself to have started before the cache has built? If so, is there a different event we should be hooking into that won't be triggered until data is available?
Alternatively is there some kind of endpoint I can call from the admin side or from somewhere else that will allow me to force a cache rebuild even if the lock file exists? I'm pretty confident that if I can get the cache rebuilt everything will work normally again.
Umbraco won't start: "Missing cmsContentNu published content consider rebuilding" - but cannot rebuild because of lock
My local dev version of Umbraco (running 10.6.1) is failing to start and the message I get is
Fatal Panic, exception while loading cache data. System.InvalidOperationException: Missing cmsContentNu published content for node 1059, consider rebuilding.
A little later we see a second fatal exception:
Fatal, An error occurred starting the application System.AggregateException: One or more errors occurred. (The process cannot access the file 'Temp\UmbracoData\abcdefghij\NuCache\NuCache.Content.db' because it is being used by another process.)
I can access the back-end but when I go to the rebuild cache I get the same message about not being able to access the cache and all of the "reload" buttons are greyed out.
Sure enough in my
Temp\UmbracoData\abcdefghij\
folder I can see aMainDom_949392391abcdafd123121.lock
file which I assume is keeping anything from trying to rebuild the cache. I can't kill the lock because IIS is keeping it open. I can delete it if I kill IIS, but when I start again it just recreates it.This build is stable on other machines and it was running fine on mine until I ran some tests connecting to another database yesterday and then switched back.
I have deleted my whole
'Temp\UmbracoData\abcdefghij
folder and it gets rebuilt with the lock file that then sticks in place.My current assumption is that this is a problem with some part of my local cache configuration - can I manually purge all the caches and force Umbraco to rebuild everything on start-up? Alternatively can I find a way to force it to unlock the caches so they can be rebuilt from within the system?
Investigating more, what I think is happening is that our application is trying to access node data while the cache is still rebuilding. When this fails it causes the initial request to fall over in a way that also kills the cache rebuild, leaving the lock file in place.
I believe that these are being triggered by an
UmbracoStartedNotificationListener
- does Umbraco consider itself to have started before the cache has built? If so, is there a different event we should be hooking into that won't be triggered until data is available?Alternatively is there some kind of endpoint I can call from the admin side or from somewhere else that will allow me to force a cache rebuild even if the lock file exists? I'm pretty confident that if I can get the cache rebuilt everything will work normally again.
is working on a reply...