Versions used:
EPiServer 10 (with latest package updates)
Visual Studio 2017 15.0.0-RTW+26228.4
Also occurs with VS 2015
Preface:
EPiServer is a CMS which allows content types and page types to be defined in code. When those are updated, a task will update respective items in database.
When I add or remove properties from page types, and build the solution, and I have previously run the project, I get a yellow screen of death with "The wait operation timed out". Tried to post the snippet on pastebin, not allowed to link there apparently, so enjoy the full copypaste:
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\Nero\AppData\Local\Temp\Temporary ASP.NET Files\vs\629ed9b8\61dc577e\App_global.asax.zccg9sff.0.cs Line: 0
Stack Trace:
[Win32Exception (0x80004005): The wait operation timed out]
[SqlException (0x80131904): 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) +631
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +3790
System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +58
System.Data.SqlClient.SqlDataReader.get_MetaData() +89
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +388
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +2041
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +377
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +53
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +255
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +86
Mediachase.BusinessFoundation.Data.Sql.<>c__DisplayClass49_0.<ExecuteReader>b__0() +170
EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute(Func`1 method) +713
Mediachase.BusinessFoundation.Data.Sql.SqlHelper.WithRetry(Func`1 action) +118
Mediachase.BusinessFoundation.Data.Sql.SqlHelper.ExecuteReader(SqlConnection connection, SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters, SqlConnectionOwnership connectionOwnership) +240
Mediachase.BusinessFoundation.Data.Sql.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +140
Mediachase.BusinessFoundation.Data.Sql.SqlHelper.ExecuteReader(SqlContext context, CommandType commandType, String commandText, SqlParameter[] commandParameters) +167
Mediachase.BusinessFoundation.Data.Sql.SqlHelper.ExecuteReader(SqlContext context, CommandType commandType, String commandText) +53
Mediachase.BusinessFoundation.Data.Sql.Management.SystemStoredProcedure.ExecuteSpTables() +60
Mediachase.BusinessFoundation.Data.Sql.Management.Database.FillTables(Database database, TableCollection tables) +112
Mediachase.BusinessFoundation.Data.Sql.Management.Database.get_Tables() +423
Mediachase.BusinessFoundation.Data.Sql.SqlContext.GetTable(String tableName) +160
Mediachase.BusinessFoundation.Data.Sql.SqlCommandBuilder..ctor(String table) +67
Mediachase.BusinessFoundation.Data.Sql.SelectCommandBuilder..ctor(String tableName, FilterElementCollection filters, SortingElementCollection sorting) +135
Mediachase.BusinessFoundation.Data.DataHelper.List(String tableName, Int32 maxCount, FilterElementCollection filters, SortingElementCollection sorting) +213
Mediachase.BusinessFoundation.Data.DataHelper.List(String tableName, Int32 maxCount) +187
Mediachase.BusinessFoundation.Data.DataHelper.List(String tableName) +47
Mediachase.BusinessFoundation.Data.Meta.Management.SqlSerialization.mcmd_MetaFieldTypeRow.List() +94
Mediachase.BusinessFoundation.Data.Meta.Management.SqlSerialization.SqlSerializer.DeserializeInternal() +606
Mediachase.BusinessFoundation.Data.Meta.Management.SqlSerialization.SqlSerializer.Deserialize() +110
Mediachase.BusinessFoundation.Data.DataContext.InitMetaModel() +43
Mediachase.BusinessFoundation.Data.DataContext.get_MetaModel() +66
Mediachase.Commerce.Customers.Plugins.<>c.<CheckNeedInstall>b__14_0(String x) +21
System.Linq.Enumerable.Any(IEnumerable`1 source, Func`2 predicate) +140
Mediachase.Commerce.Customers.Plugins.AutoInstallMetaDataModule.CheckNeedInstall(String connectionString) +150
Mediachase.Commerce.Customers.Plugins.AutoInstallMetaDataModule.Execute(BusinessContext context) +94
Mediachase.Commerce.Initialization.CommerceInitialization.Initialize(InitializationEngine context) +341
EPiServer.Framework.Initialization.Internal.<>c__DisplayClass3_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() +295
[InitializationException: Initialize action failed for Initialize on class Mediachase.Commerce.Initialization.CommerceInitialization, Mediachase.Commerce, Version=10.4.2.0, Culture=neutral, PublicKeyToken=6e58b501b34abce3]
EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +608
EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +145
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) +377
EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +172
EPiServer.Global..ctor() +76
WoodMac.Site.Global..ctor() +29
ASP.global_asax..ctor() in c:\Users\Nero\AppData\Local\Temp\Temporary ASP.NET Files\vs\629ed9b8\61dc577e\App_global.asax.zccg9sff.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) +162
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +233
System.Activator.CreateInstance(Type type, Boolean nonPublic) +75
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1095
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +212
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +19
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +289
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) +781
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +96
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +195
Occasionally I'm able to get out of this by forcing a website restart through modifying web.config. Sometimes it takes 4-5 restarts, other times I give up and restart Visual Studio because stopping and restarting IIS doesn't work and neither does cleaning, rebuilding, and rerunning. The only way to "guarantee" (I put that into quotation marks because I swear it didn't work one time) YSOD-less execution is to restart VS.
This is an issue that probably exists in DXC environment as well, because I get 504's occasionally when deploying, but they get resolved in a few refreshes fortunately. Not sure why it's just dying on IIS Express.
I've tried the usual fixes, which is attempting to use custom timeouts in connection strings, as well as epi specific fixes like dataStore configsection. Zilch.
Naturally as we're in the middle of a development, this is a really irksome issue as properties are updated and removed multiple times a day, and any time that is spent on booting, is time not spent on development. Is there any way to ensure that, no matter what other errors happen, there wouldn't be issues relating to timed out connections?
I found this support article about timeout exceptions during scheduled jobs.
The same "fix" worked for this problem with timeout when adding/removing properties as well!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.