Copied to clipboard

Flag this post as spam?

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


  • Murray Roke 503 posts 966 karma points c-trib
    Jul 15, 2020 @ 05:10
    Murray Roke
    0

    uSync - NuCache.Content.db is being used by another process (not azure)

    I see this error intermittently, after adding uSync but not before. I need to re-start the website or app pool to fix this. The stack trace does not mention uSync, so I'm not 100% sure it's related, but it seems to be. This is on a windows machine running IIS, not azure. The App_data is a virtual dir and persisted between deployments, so potentially there is some overlaping app pool business going on, but seems only to occur when uSync is installed. I have uSync set to sync on startup.

    [BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.
    
    -> Umbraco.Core.Exceptions.BootFailedException: Boot failed.
    
    -> System.IO.IOException: The process cannot access the file 'D:\wwwdeployment\test\Usync\Master-App_Data\TEMP\NuCache\NuCache.Content.db' because it is being used by another process.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
       at CSharpTest.Net.IO.TransactedCompoundFile..ctor(Options options)
       at CSharpTest.Net.Storage.BTreeFileStoreV2..ctor(Options options)
       at CSharpTest.Net.Collections.BPlusTree`2.OptionsV2.CreateStorage()
       at CSharpTest.Net.Collections.BPlusTree`2.NodeCacheBase..ctor(BPlusTreeOptions`2 options)
       at CSharpTest.Net.Collections.BPlusTree`2.NodeCacheNone..ctor(BPlusTreeOptions`2 options)
       at CSharpTest.Net.Collections.BPlusTree`2..ctor(BPlusTreeOptions`2 ioptions)
       at Umbraco.Web.PublishedCache.NuCache.DataSource.BTree.GetTree(String filepath, Boolean exists)
       at Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService.MainDomRegister()
       at Umbraco.Core.Runtime.MainDom.Register(Action install, Action release, Int32 weight)
       at Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService..ctor(PublishedSnapshotServiceOptions options, IMainDom mainDom, IRuntimeState runtime, ServiceContext serviceContext, IPublishedContentTypeFactory publishedContentTypeFactory, IdkMap idkMap, IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, IProfilingLogger logger, IScopeProvider scopeProvider, IDocumentRepository documentRepository, IMediaRepository mediaRepository, IMemberRepository memberRepository, IDefaultCultureAccessor defaultCultureAccessor, IDataSource dataSource, IGlobalSettings globalSettings, IEntityXmlSerializer entitySerializer, IPublishedModelFactory publishedModelFactory, UrlSegmentProviderCollection urlSegmentProviders)
       at DynamicMethod(Object[] )
       at LightInject.PerContainerLifetime.GetInstance(Func`1 createInstance, Scope scope)
       at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter)
       at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms)
       at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency)
       at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action`1 decoratorTargetEmitter)
       at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action`1 decoratorTargetEmitMethod)
       at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter)
       at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter)
       at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1()
       at LightInject.PerContainerLifetime.GetInstance(Func`1 createInstance, Scope scope)
       at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter)
       at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms)
       at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency)
       at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action`1 decoratorTargetEmitter)
       at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action`1 decoratorTargetEmitMethod)
       at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter)
       at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter)
       at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1()
       at LightInject.PerContainerLifetime.GetInstance(Func`1 createInstance, Scope scope)
       at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter)
       at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms)
       at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency)
       at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action`1 decoratorTargetEmitter)
       at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action`1 decoratorTargetEmitMethod)
       at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter)
       at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms)
       at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter)
       at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)
       at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError)
       at LightInject.ServiceContainer.GetInstance(Type serviceType)
       at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItem(IFactory factory, Type itemType)
       at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
       at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItems(IFactory factory)
       at Umbraco.Core.Composing.CollectionBuilderBase`3.CreateCollection(IFactory factory)
       at LightInject.PerContainerLifetime.GetInstance(Func`1 createInstance, Scope scope)
       at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter)
       at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms)
       at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter)
       at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)
       at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError)
       at LightInject.ServiceContainer.GetInstance(Type serviceType)
       at Umbraco.Core.FactoryExtensions.GetInstance[T](IFactory factory)
       at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer)]
       Umbraco.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException) +339
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +223
       System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +213
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +91
    
  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jul 15, 2020 @ 07:50
    Ismail Mayat
    0

    What version are you on? I know more recent versions have fix for locking issues. To be honest I have only seen this on azure and I used a workaround that Callum showed me.

  • Murray Roke 503 posts 966 karma points c-trib
    Jul 16, 2020 @ 02:23
    Murray Roke
    0

    Umbraco v8.6.3 uSync v8.6.3

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Jul 15, 2020 @ 09:01
    Kevin Jump
    0

    Hi

    I don't think this is a uSync issue, the locking of the nucache file is more of an umbraco thing, and happens before uSync can do anything.

    if you are sharing the app_data folder (and so the nucache files) between servers then you are in effect running a very similar setup to Azure, and there have been a number of updates and config options added to aid with this issue on azure : https://our.umbraco.com/Documentation/Getting-Started/Setup/Server-Setup/azure-web-apps

    The Umbraco.Core.MainDom.Lock settings are probably worth paying attention to.

  • Murray Roke 503 posts 966 karma points c-trib
    Jul 30, 2020 @ 02:08
    Murray Roke
    0

    Hi Kevin, This is definitely not a uSync issue, we are seeing it on all our Umbraco v8.6.3 sites, and none have uSync.

    Ismail, What was the workaround you used? wondering if it will help us, despite the fact we aren't using azure?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jul 30, 2020 @ 09:55
Please Sign in or register to post replies

Write your reply to:

Draft