Inhalte aufrufen

Profilbild

The wait operation timed out


3 Antworten zu diesem Thema

#1 Nak3re

Nak3re

    Member

  • Members
  • PunktPunkt
  • 21 Beiträge

Geschrieben: 12 September 2017 - 12:10

Hello there, long time no see!

 

It's been a while since i messed with smartstore, and it seems i 've missed a major update.

 

So since v3.02 is out i thought why don't i upgrade to the latest version and enjoy the new very handsome btw looks of smartstore...

 

And to no surprise i encountered some problems.

 

As i understand the new update brings changes among others to the place where media is stored, changing from "Media" to "Media/Default". Accordingly smartstore uses UpdatePath to change the location where the db looks to find our media. This is where my problem lies. Apart from changing to a newer version we decided to migrate to a different server, one with more disk space.

 

After trying to load my fresh "installation" of smartstore using same old db that i restored to the new server and leaving AppData and Media folders untouched i encountered the following issue

 

 

Server Error in '/' Application. The wait operation timed out Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ComponentModel.Win32Exception: The wait operation timed out

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: 

[Win32Exception (0x80004005): The wait operation timed out]

[DbMigrationException: Migration '201706020759565_UpdateMediaPath' could not be applied due to following error: 'The wait operation timed out'. All changes to the database were reversed to '201403112331027_Initial'. Please downgrade your application to a version which is known to be compatible with '201403112331027_Initial'.]
SmartStore.Data.Setup.DbSeedingMigrator`1.RunPendingMigrations(TContext context) +1670
SmartStore.Data.Setup.MigrateDatabaseInitializer`2.InitializeDatabase(TContext context) +238
System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +71
System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +482
System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +174
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +273
System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes() +62
System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext() +31
SmartStore.Data.ObjectContextBase..ctor(String nameOrConnectionString, String alias) +119
SmartStore.Web.Framework.<>c.<Load>b__2_6(IComponentContext c) +70
Autofac.Builder.<>c__DisplayClass0_0`1.<ForDelegate>b__0(IComponentContext c, IEnumerable`1 p) +15
Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +32
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +110

[DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = IDbContext (DelegateActivator), Services = [SmartStore.Core.Data.IDbContext], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Migration '201706020759565_UpdateMediaPath' could not be applied due to following error: 'The wait operation timed out'. All changes to the database were reversed to '201403112331027_Initial'. Please downgrade your application to a version which is known to be compatible with '201403112331027_Initial'. (See inner exception for details.)]
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +433
Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +151
Autofac.Core.Resolving.InstanceLookup.Execute() +165
Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +170
Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +118
Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +85
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +110

[DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = EfRepository`1 (ReflectionActivator), Services = [SmartStore.Core.Data.IRepository`1[[SmartStore.Core.Domain.Customers.Customer, SmartStore.Core, Version=3.0.2.0, Culture=neutral, PublicKeyToken=null]]], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = IDbContext (DelegateActivator), Services = [SmartStore.Core.Data.IDbContext], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Migration '201706020759565_UpdateMediaPath' could not be applied due to following error: 'The wait operation timed out'. All changes to the database were reversed to '201403112331027_Initial'. Please downgrade your application to a version which is known to be compatible with '201403112331027_Initial'. (See inner exception for details.) (See inner exception for details.)]
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +433
Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +151
Autofac.Core.Resolving.InstanceLookup.Execute() +165
Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +170
Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +118
Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +85
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +110

[DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = CustomerService (ReflectionActivator), Services = [SmartStore.Services.Customers.ICustomerService], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = EfRepository`1 (ReflectionActivator), Services = [SmartStore.Core.Data.IRepository`1[[SmartStore.Core.Domain.Customers.Customer, SmartStore.Core, Version=3.0.2.0, Culture=neutral, PublicKeyToken=null]]], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = IDbContext (DelegateActivator), Services = [SmartStore.Core.Data.IDbContext], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Migration '201706020759565_UpdateMediaPath' could not be applied due to following error: 'The wait operation timed out'. All changes to the database were reversed to '201403112331027_Initial'. Please downgrade your application to a version which is known to be compatible with '201403112331027_Initial'. (See inner exception for details.) (See inner exception for details.) (See inner exception for details.)]
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +433
Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +151
Autofac.Core.Resolving.InstanceLookup.Execute() +165
Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +170
Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +118
Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +85
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +110

[DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = WebWorkContext (ReflectionActivator), Services = [SmartStore.Core.IWorkContext], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = CustomerService (ReflectionActivator), Services = [SmartStore.Services.Customers.ICustomerService], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = EfRepository`1 (ReflectionActivator), Services = [SmartStore.Core.Data.IRepository`1[[SmartStore.Core.Domain.Customers.Customer, SmartStore.Core, Version=3.0.2.0, Culture=neutral, PublicKeyToken=null]]], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = IDbContext (DelegateActivator), Services = [SmartStore.Core.Data.IDbContext], Lifetime = Autofac.Core.Lifetime.MatchingScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Migration '201706020759565_UpdateMediaPath' could not be applied due to following error: 'The wait operation timed out'. All changes to the database were reversed to '201403112331027_Initial'. Please downgrade your application to a version which is known to be compatible with '201403112331027_Initial'. (See inner exception for details.) (See inner exception for details.) (See inner exception for details.) (See inner exception for details.)]
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +433
Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +151
Autofac.Core.Resolving.InstanceLookup.Execute() +165
Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +170
Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) +108
Autofac.Features.LazyDependencies.<>c__DisplayClass5_0`1.<CreateLazyRegistration>b__1() +44
System.Lazy`1.CreateValue() +737
System.Lazy`1.LazyInitValue() +431
SmartStore.Web.Framework.Localization.SetWorkingCultureAttribute.OnAuthorization(AuthorizationContext filterContext) +122
System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor) +156
System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__19(AsyncCallback asyncCallback, Object asyncState) +1166
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +169
System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +455
System.Web.Mvc.Controller.<BeginExecuteCore>b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState) +42
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +67
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +169
System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +901
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +169
System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +711
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) +93
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +67
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +169
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +575
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1028
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2103.2

 

I am fairly certain that the timeout has to do with migration trying to change the MediaPath for approx. 1.100.000 media files.

 

My question is if there is a way to change the default timeout for migration or if i need to stick to 2.6?

 

Thank you in advance!

 

 

Regards,

Angelos.



#2 Artar

Artar

    SmartStore AG

  • Administrators
  • 886 Beiträge

Geschrieben: 12 September 2017 - 16:09

Hello Angelos,

 

are the media files in the database or on the filesystem? probably they are on the filesystem.

 

before the migration, you could move the content of the Media folder to a temp folder outside Media and move them back after the migration in to Media\Default\ folder.

 

it is also important to run the app-pool in 64-bit mode and set the sql server connection timeout value to 0 or a very high value (if possible).


Zihni Artar
SmartStore AG


#3 Nak3re

Nak3re

    Member

  • Members
  • PunktPunkt
  • 21 Beiträge

Geschrieben: 14 September 2017 - 07:16

Hello again, thank you for the quick reply!

 

Firstly yes, you are correct to assume that my media files are on the File System and not on the database.

 

While the website tried to build again (the first time) the media files were properly transferred to the Default folder (i had a mini heart attack when i opened Media and only saw a folder instead of 1 million photos!) despite getting the timeout error. Afterwards i tried doing exactly what you said, renaming media folder and start over however the error persisted. App-pool is running on 64-bit mode, my sql server connection timeout is set to 0 and also i have changed the connection timeout from the settings file on appData/Tenants/Default folder.

 

P.S. I thought i had posted this yesterday, and today once i got to work i saw the thread reply left open as is without the P.S.... i need a break!



#4 Nak3re

Nak3re

    Member

  • Members
  • PunktPunkt
  • 21 Beiträge

Geschrieben: 15 September 2017 - 12:07

Hello once again,

 

After quite some time searching i think i found how to increase the CommandTimeout since i think it's the command and not the connection timeout that messes with the migration.

 

However when i try to build the project from clicktobuild.cmd i encounter several warnings regarding conflicts between assemblies and also the following error:

 

 

"C:\Users\Administrator\Desktop\Development\SmartStoreNET.proj" (Deploy target) (1) ->

       (Stage target) ->
         C:\Users\Administrator\Desktop\Development\SmartStoreNET.Tasks.Targets(169,3): error MSB4062: The "TransformXm
       l" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Mi
       crosoft.Web.Publishing.Tasks.dll. Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\Micros
       oft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.Tasks.dll' or one of its dependencies. The system cannot fin
       d the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its depende
       ncies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
       [C:\Users\Administrator\Desktop\Development\SmartStoreNET.proj]

 

The dll is where it should be, i double checked. Is there anything else i should search for that might be missing?

Thanks in advance!





Auf dieses Thema antworten