EPiServer:等待操作超时

时间:2017-05-03 08:37:48

标签: c# sql-server asp.net-mvc episerver

使用的版本:

EPiServer 10(包含最新的软件包更新)

Visual Studio 2017 15.0.0-RTW + 26228.4

VS 2015也会出现

序:

EPiServer是一个CMS,它允许在代码中定义内容类型和页面类型。更新后,任务将更新数据库中的相应项目。

当我在页面类型中添加或删除属性,并构建解决方案,并且我之前运行过该项目时,我会看到“等待操作超时”的黄色死亡屏幕。试图将片段发布在pastebin上,不允许明显地链接到那里,所以享受完整的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

偶尔我可以通过修改web.config强制网站重启来解决这个问题。有时需要重新启动4-5次,有时我会放弃并重新启动Visual Studio,因为停止并重新启动IIS不起作用,清理,重建和重新运行也不起作用。 “保证”的唯一方法(我把它放到引号中因为我发誓它不能一次工作)YSOD-less执行是重启VS.

这也是DXC环境中可能存在的问题,因为我在部署时偶尔会得到504,但幸运的是,它们会在一些刷新中得到解决。不确定为什么它只是死于IIS Express。

我尝试过常用的修补程序,它试图在连接字符串中使用自定义超时,以及像dataStore configsection这样的epi特定修复程序。小人物。

当然,当我们处于开发阶段时,这是一个非常令人厌烦的问题,因为属性每天都会被多次更新和删除,而且任何花费在启动上的时间都不会花在开发上。有没有办法确保无论发生什么其他错误,都不会出现与超时联系有关的问题?

1 个答案:

答案 0 :(得分:-1)

我发现this support article关于计划作业期间的超时异常。

添加/删除属性时,相同的“修复程序”也可以解决超时问题!