Question

Photo of Aaron Porter

0

Deleting / Viewing Log of Workflows times out.

Howdy!

Been fighting with a strange issue when working with Workflows.

If a workflow has existed for longer than a few minutes I will not be able to delete it or view it's activity log since Rock will throw an exception. Does not matter what workflow configuration the workflow belongs to.

Rockstar Hazelbaker suggested I rebuild the SQL tables. I believe I did that successfully a while back but didn't prevent the exception from being thrown.

Exception in App_Code.ugehmsyd

Message
An error occurred in Entity Framework when attempting to connect to your database. This could be caused by a missing 'MultipleActiveResultSets=true' parameter in your connection string settings.

Stack Trace
at RockWeb.Global.Application_Error(Object sender, EventArgs e) in c:\inetpub\wwwroot\App_Code\Global.asax.cs:line 419
-EntityCommandExecutionException in EntityFramework

Message
An error occurred while executing the command definition. See the inner exception for details.

Stack Trace
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.b__5()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery`1..GetEnumerator>b__0()
at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at RockWeb.Blocks.WorkFlow.WorkflowDetail.BindLog() in c:\inetpub\wwwroot\Blocks\WorkFlow\WorkflowDetail.ascx.cs:line 844
at RockWeb.Blocks.WorkFlow.WorkflowDetail.ShowReadonlyDetails() in c:\inetpub\wwwroot\Blocks\WorkFlow\WorkflowDetail.ascx.cs:line 750
at RockWeb.Blocks.WorkFlow.WorkflowDetail.ShowDetail(Int32 workflowId) in c:\inetpub\wwwroot\Blocks\WorkFlow\WorkflowDetail.ascx.cs:line 693
at RockWeb.Blocks.WorkFlow.WorkflowDetail.OnLoad(EventArgs e) in c:\inetpub\wwwroot\Blocks\WorkFlow\WorkflowDetail.ascx.cs:line 141
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--SqlException in .Net SqlClient Data Provider

Message
Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Stack Trace
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
at 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)
at 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)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
---Win32Exception in

Message
The wait operation timed out

Stack Trace

Any idea what would be causing this? I can edit workflow configurations just fine. We've also had some weird behavior occurring with workflows that might be related to this. Also, SQL still intimidates me a bit. ;.;

  • Photo of Aaron Porter

    0

    The big problem was I had Workflow logging turned on for some very popular workflows. This caused our database to gain 36gbs of bloat. Disabled the workflow logging and ran SQL queries to remove the bloat fixed it. Things are much happier now!

  • Photo of David Stevens

    0

    This is a known issue with Workflow Logs in pre-v7 databases that tend to bloat. You'll need to do some manual maintenance to clean up that table: either removing a batch at a time or truncating the whole table.  See discussion at https://github.com/SparkDevNetwork/Rock/issues/1670.