Copied to clipboard

Flag this post as spam?

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


  • Lasse Kofoed 46 posts 173 karma points
    Dec 21, 2020 @ 19:13
    Lasse Kofoed
    0

    Multiple hostname sites NuCache.Content.db' because it is being used by another process

    2 sites in one umbraco solution 8.9.1 If i restart the app_pool, whatever site i start first, will run but the other will return a NuCache.Content.db' because it is being used by another process.

    I works on my local server, but when uploading to my hosting provider wannafind.dk I get this error.

    -> System.IO.IOException: The process cannot access the file 'D:\WEB\xxMYSITExx.com\www\App_Data\TEMP\NuCache\NuCache.Content.db' because it is being used by another process.

    I have tried

    <add key="umbracoLocalTempStorage" value="Default" />
    <add key="Umbraco.Core.MainDom.Lock" value="SqlMainDomLock" />
    

    and

    <add key="umbracoLocalTempStorage" value="EnvironmentTemp" />
    <add key="Umbraco.Core.MainDom.Lock" value="SqlMainDomLock" />
    

    both resulting in the same error.

    I read somewhere that the app_data somehow was not setup properly, because of the d:\web and not d:\temp. Don't know it this is a "Azure only" sign.

    I see multiple treads about this, but all leads to the same umbracoLocalTempStorage and Umbraco.Core.MainDom.Lock issues.

    Hopefully somebody can help me.. I kind of said to the customer.. "No Problem.. Umbraco does is all"

  • Bo Jacobsen 438 posts 1818 karma points
    Dec 21, 2020 @ 19:45
    Bo Jacobsen
    0

    Hi Lasse.

    We also ran into this issue on some of our provider server. We had to set it up as it was an Azure Server.

    I bet its the umbracoLocalTempStorage that needs to changed to use the database (I know it is slower), but its a work around, until Umbraco see this as their issue and fix it.

  • Lasse Kofoed 46 posts 173 karma points
    Dec 21, 2020 @ 19:54
    Lasse Kofoed
    0

    Hi Bo,

    Can you point me to a example of the database version of the umbracoLocalTempStorage ?

    I have tried all the setting from the documentation https://our.umbraco.com/documentation/reference/config/webconfig/#umbracocorelocaltempstorage

  • Bo Jacobsen 438 posts 1818 karma points
    Dec 21, 2020 @ 20:10
    Bo Jacobsen
    100

    I dunno about the Umbraco.Core.MainDom.Lock. But you need the EnvironmentTemp and the Examine.LuceneEngine.Directories.SyncTempEnvDirectoryFactory, Examine in your web.config.

    <add key="Umbraco.Core.LocalTempStorage" value="EnvironmentTemp" />
    <add key="Umbraco.Examine.LuceneDirectoryFactory" value="Examine.LuceneEngine.Directories.SyncTempEnvDirectoryFactory, Examine" />
    

    But then you also need this in your code.

    [RuntimeLevel(MinLevel = RuntimeLevel.Run)]
    public class UmbracoCacheWorkaround : IUserComposer
    {
        public void Compose(Composition composition)
        {
            composition.Register(factory => new PublishedSnapshotServiceOptions { IgnoreLocalDb = true });
        }
    }
    
  • Lasse Kofoed 46 posts 173 karma points
    Dec 21, 2020 @ 20:25
    Lasse Kofoed
    0

    Thank you Bo :) the AspNetTemp in the localtempstorage worked for this case. But you code might come in handy later.

  • Lasse Kofoed 46 posts 173 karma points
    Dec 21, 2020 @ 20:06
    Lasse Kofoed
    0

    Okay,

    first.. i made a copypaste from a umbraco 7... ups umbracoLocalTempStorage is in umbraco 8 Umbraco.Core.LocalTempStorage

    So i need to run through my test again.

    <add key="Umbraco.Core.LocalTempStorage" value="EnvironmentTemp" />
    <add key="Umbraco.Core.MainDom.Lock" value="SqlMainDomLock" />
    

    Returns a

    [NullReferenceException: Object reference not set to an instance of an object.]
    

    Umbraco.Web.Runtime.WebRuntime.Boot(IRegister register) in D:\a\1\s\src\Umbraco.Web\Runtime\WebRuntime.cs:55

    [HttpException (0x80004005): Object reference not set to an instance of an object.] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +517 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +185 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +168 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +277 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369

    [HttpException (0x80004005): Object reference not set to an instance of an object.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +736

    BUT...

    <add key="Umbraco.Core.LocalTempStorage" value="AspNetTemp" />
        <add key="Umbraco.Core.MainDom.Lock" value="SqlMainDomLock" />
    

    Works... :D

    STUPID ME

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies