SaaS CMS has officially launched! Learn more now.

Unable to launch Episerver Commerce after fresh installation : Getting "The wait operation timed out"



I successfully installed Episerver Commerce by following the steps provided in Episerver World website. When I try to launch Episerver CMS, I get Exception "System.ComponentModel.Win32Exception: The wait operation timed out".Kindly, help me to resolve this issue, let me know if more details required. Please find below the complete stack trace of the exception. 

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:

[No relevant source lines]

Source File: c:\Users\PRIYANTA\AppData\Local\Temp\Temporary ASP.NET Files\vs\33b0a4e3\d5621188\App_global.asax.0.cs    Line: 0

Stack Trace:

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

[SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +212
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +81
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +630
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4233
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +261
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +2616
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +1635
   System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +375
   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +283
   Mediachase.Data.Provider.<>c__DisplayClass23_0.<ExecuteNonExec>b__0() +13
   EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute(Func`1 method) +563
   Mediachase.Data.Provider.SqlDataProvider.WithRetry(Func`1 action) +32
   Mediachase.Data.Provider.SqlDataProvider.ExecuteNonExec(DataCommand command) +319
   Mediachase.MetaDataPlus.Common.DBHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, Int32 commandTimeout, DataParameter[] commandParameters) +162
   Mediachase.MetaDataPlus.Configurator.StoredProcedure.ExecuteNonQuery(MetaDataContext context) +37
   Mediachase.MetaDataPlus.Configurator.MetaDataPlusDatabase.CreateMetaClass(MetaDataContext context, String metaNamespace, String name, String friendlyName, String tableName, String description, Int32 parentId, MetaClassType metaClassType) +835
   Mediachase.MetaDataPlus.Configurator.MetaClass.Create(MetaDataContext context, String metaNamespace, String name, String friendlyName, String tableName, Int32 parentId, MetaClassType type, String description) +64
   Mediachase.MetaDataPlus.Configurator.MetaInstaller.LoadMetaClassVersion10(MetaDataContext context, XmlNode xmlMetaClass, MetaClass parent) +459
   Mediachase.MetaDataPlus.Configurator.MetaInstaller.RestoreFromVersion10(MetaDataContext context, XmlNode root) +404
   Mediachase.MetaDataPlus.Configurator.MetaInstaller.Restore(MetaDataContext context, XmlNode root) +141
   Mediachase.MetaDataPlus.Configurator.MetaInstaller.Restore(MetaDataContext context, String xml) +145
   Mediachase.Commerce.Catalog.CatalogConfiguration.ConfigureMetaData() +93
   Mediachase.Commerce.Catalog.DefaultCatalogMetaDataModule.ConfigureMetaData() +51
   Mediachase.Commerce.Catalog.DefaultCatalogMetaDataModule.EnsureDefaultMetaData() +79
   Mediachase.Commerce.Initialization.CatalogInitialization.Initialize(InitializationEngine context) +46
   EPiServer.Framework.Initialization.Internal.<>c__DisplayClass2_0.<Initialize>b__0() +19
   EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +52
   EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context) +80
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +179

[InitializationException: Initialize action failed for Initialize on class Mediachase.Commerce.Initialization.CatalogInitialization, Mediachase.Commerce, Version=, Culture=neutral, PublicKeyToken=6e58b501b34abce3]
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +482
   EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +153
   EPiServer.Framework.Initialization.InitializationEngine.Initialize() +40
   EPiServer.Framework.Initialization.<>c.<FrameworkInitialization>b__7_0(InitializationEngine e) +9
   EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +453
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +170
   EPiServer.Global..ctor() +44
   CommerceTraining.EPiServerApplication..ctor() +29
   ASP.global_asax..ctor() in c:\Users\PRIYANTA\AppData\Local\Temp\Temporary ASP.NET Files\vs\33b0a4e3\d5621188\App_global.asax.0.cs:0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +122
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +239
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +85
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1173
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +130
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +21
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +59
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +148
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +303

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +659
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +89
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +188

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4075.0
May 25, 2020 6:50

Have you tried exec sp_updatestats in the CMS database?

May 25, 2020 7:23

I have executed "exec sp_updatestats" but I am still getting the same error.

May 26, 2020 11:04

Hi Priyanta,

Error trace says something not well with SQL so can you please make sure that you are able to access the SQL databases. 

Please check the connection string and try to connect the databases.

May 28, 2020 8:05

Hi Priyanta

Did you finally get to the bottom of this. I am restoring a db and setting up a site on my dev machine for the first time and am getting the exact same error.



Aug 11, 2020 11:34

Hi Priyanta

  1. Is the database running on your local machine or on another machine?
  2. Is the connection being silently dropped by a local firewall?
  3. How does your connection string look? Does it include a CommandTimeout part?
Aug 12, 2020 7:36


We seem to haev resolved this issue. It looks like this is to do with some uncomited property or some CMS uncomiited transaction when the backup of the DB was being taken.

There are a couple of other threads pointing this out. 

We got everyone to commit their cms changes and stoppped all content editors from doing any work while we took the backup of the DB.

The fresh copy of DB does not seem to have the issue.

There is an article to increase the epi timeout which seems to be doing something more than timing out but we were not sure how long it would run so we just got a fresh copy of the CMS DB and restored and it seem to work.



Aug 12, 2020 7:40

Can you connect to the database instance using SQL Server Management studio using information in connectionStrings? 

Aug 12, 2020 7:41

HI Quan

Yes I was able to connect to it in mgmt studio without any issue. The application was also able to speak to the DB as when I changed the db name or the username to a non existent value it gave an error that DB does not exist. Comm manager was also loading fine.

As mentioned above taking a fresh backup of the cms seem to have esolved the issue. Would be good to know why it was not working. 



Aug 12, 2020 7:47
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.