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.
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
No last synced Id found, this generally means this is a new server/install,
Exception. The thread has been aborted, because the request has timed out. System.Threading.ThreadAbortException: Thread was being aborted at SNIReadSyncOverAsync
Panic, exception while loading cache data. System.InvalidOperationException: Invalid operation. The connection is closed at System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute
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.
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.
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
What path does it say is locked?
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.
And you see this when the application is migrating to a new host?
Also, do you use applicationInitialization?
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
No last synced Id found, this generally means this is a new server/install,
Exception. The thread has been aborted, because the request has timed out. System.Threading.ThreadAbortException: Thread was being aborted at SNIReadSyncOverAsync
Panic, exception while loading cache data. System.InvalidOperationException: Invalid operation. The connection is closed at System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute
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.
Interesting, was it scale down or up to both that triggered the error?
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.
is working on a reply...