Hello,
Our case is that we have a WF designed using SharePoint designer 2010. This WF is linked to a content type (InfoPath form) in a forms library and it is some how complex where its complexity is around 9000 (It has many approval steps and some of them are parallel).
Sometimes, When a form is in the WF, it gets stuck where one of the approving users gets an error message on completing his task that "The task is currently locked by a running WF and can't be updated" and sometimes the status changes to "Error Occurred" so in some of these cases, we have to restart the WF.
On doing so, the WF sometimes doesn't start directly and we see a message in the WF page with the following text : "Note: Due to heavy load, the latest workflow operation has been queued. It will attempt to resume at a later time." sometimes the WF proceeds after this message within 10 mins but some times , the WF gets the status "Failed to restart (Retrying)" and it could then start but the approvals take long time to reflect (ex: the user completes the task but the task gets completed after 1 hour).
Today, we had an urgent document and the same issue happened and we restarted the WF but we noticed the following errors in the log file so if you could please check and advise what can be done to avoid these errors:
Slow Query Duration: 43621.9473499572 83eb4546-9f02-44f3-9083-35baa2fbd74a 10/10/2018 10:33:46.26 OWSTIMER.EXE (0x4E20) 0x5FA0 SharePoint Foundation Database fa44 High Slow Query StackTrace-Managed: at Microsoft.SharePoint.Utilities.SqlSession.OnPostExecuteCommand(SqlCommand command, SqlQueryData monitoringData) at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command) at Microsoft.SharePoint.Workflow.SPWorkflowManager.SaveInstanceData(Guid instanceId, Stream instanceStream, Stream activityDetailsStream, DateTime wakeupTime, Boolean workflowCompleted, Boolean workflowSuspended, Boolean workflowFaulting, Boolean workflowTerminated, Boolean workflowCanceled, Boolean unlockInstance) at Microsoft.SharePoint.Workflow.SPWorkflowHostServiceBase.SaveInstanceData(Guid instanceId, Stream instanceStream, Stream activityDetails, DateTime wakeupTime, Boolean bWorkflowCompleted, Boolean bWorkflowSuspended, Boolean bWorkflowFaultin... 83eb4546-9f02-44f3-9083-35baa2fbd74a 10/10/2018 10:33:46.26* OWSTIMER.EXE (0x4E20) 0x5FA0 SharePoint Foundation Database fa44 High ...g, Boolean bWorkflowTerminated, Boolean bWorkflowCanceled, Boolean unlockInstance) at Microsoft.SharePoint.Workflow.SPWinOePersistenceService.Commit(Transaction transaction, ICollection items) at System.Workflow.Runtime.WorkBatch.PendingWorkCollection.Commit(Transaction transaction) at System.Workflow.Runtime.WorkBatch.Commit(Transaction transaction) at System.Workflow.Runtime.Hosting.WorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback) at System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback) at System.Workflow.Runtime.WorkflowExecutor.CommitTransaction(Activity activityContext) at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity d... 83eb4546-9f02-44f3-9083-35baa2fbd74a 10/10/2018 10:33:46.26* OWSTIMER.EXE (0x4E20) 0x5FA0 SharePoint Foundation Database fa44 High ...ynamicActivity, Boolean unlock, Boolean needsCompensation) at System.Workflow.Runtime.WorkflowExecutor.ProtectedPersist(Boolean unlock) at System.Workflow.Runtime.WorkflowExecutor.PerformUnloading(Boolean handleExceptions) at System.Workflow.Runtime.WorkflowExecutor.RunScheduler() at System.Workflow.Runtime.WorkflowExecutor.RunSome(Object ignored) at System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService.WorkItem.Invoke(WorkflowSchedulerService service) at System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService.RunOne(Guid workflowInstanceId) at System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService.RunWorkflow(Guid workflowInstanceId) at Microsoft.SharePoint.Workflow.SPWinOeHostServices.Send(SPWorkflow workflow, SPWinOeWorkflow winoe... 83eb4546-9f02-44f3-9083-35baa2fbd74a 10/10/2018 10:33:46.26* OWSTIMER.EXE (0x4E20) 0x5FA0 SharePoint Foundation Database fa44 High ...workflow, SPWorkflowEvent e) at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut) at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, Collection`1 events, SPWorkflowRunOptionsInternal runOptions) at Microsoft.SharePoint.Administration.SPWorkflowJobDefinition.ProcessWorkItems(SPContentDatabase contentDatabase, SPWorkItemCollection workItems, SPJobState jobState) at Microsoft.SharePoint.Administration.SPWorkItemJobDefinition.HandleOneContentDatabase(SPContentDatabase db, SPJobState jobState) at Microsoft.SharePoint.Administration.SPWorkItemJobDefinition.Execute(SPJobState jobState) at Microsoft.SharePoint.Administration.SPTimerJobInvokeInte... 83eb4546-9f02-44f3-9083-35baa2fbd74a 10/10/2018 10:33:46.26* OWSTIMER.EXE (0x4E20) 0x5FA0 SharePoint Foundation Database fa44 High ...rnal.Invoke(SPJobDefinition jd, Guid targetInstanceId, Boolean isTimerService, Int32& result) at Microsoft.SharePoint.Administration.SPTimerJobInvoke.Invoke(TimerJobExecuteData& data, Int32& result) 83eb4546-9f02-44f3-9083-35baa2fbd74a
10/10/2018 10:34:46.17 OWSTIMER.EXE (0x4E20) 0x5FA0 SharePoint Foundation Workflow Infrastructure 98d5 Unexpected System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.IO.MemoryStream..ctor(Int32 capacity) at System.Workflow.Runtime.Hosting.WorkflowPersistenceService.GetDefaultSerializedForm(Activity activity) at Microsoft.SharePoint.Workflow.SPWinOePersistenceService.SaveWorkflowInstanceState(Activity instanceState, Boolean unlock) at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation) at System.Workflow.Runtime.WorkflowExecutor.ProtectedPersist(Boolean unlock) at System.Workflow.Runtime.WorkflowExecutor.PerformUnloading(Boolean handleExceptions) at System.Workflow.Runtime.WorkflowExecutor.RunScheduler() at System.Workflow.Runtime.WorkflowExecutor.RunSome(Obje... 83eb4546-9f02-44f3-9083-35baa2fbd74a 10/10/2018 10:34:46.17* OWSTIMER.EXE (0x4E20) 0x5FA0 SharePoint Foundation Workflow Infrastructure 98d5 Unexpected ...ct ignored) at System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService.WorkItem.Invoke(WorkflowSchedulerService service) at System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService.RunOne(Guid workflowInstanceId) 83eb4546-9f02-44f3-9083-35baa2fbd74a
10/10/2018 12:53:10.42 w3wp.exe (0x4FC0) 0x07C8 SharePoint Foundation Workflow Infrastructure 75yn Unexpected Load Workflow Assembly: System.IO.FileNotFoundException: Could not load file or assembly 'BihConsumerInterop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=48e046c834625a88' or one of its dependencies. The system cannot find the file specified. File name: 'BihConsumerInterop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=48e046c834625a88' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assem... 10/10/2018 12:53:10.42* w3wp.exe (0x4FC0) 0x07C8 SharePoint Foundation Workflow Infrastructure 75yn Unexpected ...blySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.SharePoint.Workflow.SPWinOeHostServices.LoadWorkflowAssembly(SPWorkflowManager manager, String name)
So if you could please advise.
Thank you.
Best Regards,
Marwa Mostafa









