LP13
LP13

Reputation: 34079

Windows workflow not waking up after delay

We have windows workflow service with two Sequences. between these two sequences there is delay activity set to new TimeSpan(0,0,10) that is 10 seconds.

MainSequence
   Sequqnce_1
   Delay
   Sequqnce_2

So after 1st sequence executed WF persist to SQL server and then after 10 sec it wakes up to do 2nd sequence.

This was working for last 3 years. But suddenly (since yesterday) WF stops after waking up after delay

I enabled system.diagnistics in web.config and in the log i see the following

DisplayName: 'Sequence_1', InstanceId: '2' has completed in the 'Closed' state

Activity 'System.Activities.Statements.Sequence', DisplayName: 'MainSequence', InstanceId: '1' scheduled child Activity 'System.Activities.Statements.Delay', DisplayName: 'Delay'

After that there is nothing in the log.

When i check Workflow database i see the entry in [System.Activities.DurableInstancing].InstancesTable however i noticed PendingTimer is NULL

I am not sure if PendingTimer NULL is causing this issue, and if it is why WF is setting it as null?

UPDATE 1
Turned out my coworker ran windows update on that server which installed .Net 4.7 on the server. However WF application is set to target framework 4.5.1. I am not sure if the update is causing this issue

Update 2

I enabled ETW tracing to see whats going on and i see the following exception

The version of the database cannot be determined as no rows were found in System.Activities.DurableInstancing.SqlWorkflowInstanceStoreVersionTable. This table should contain a single row that corresponds to the version of the framework that it was created with or upgraded to

Complete exception

System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089The version of the database cannot be determined as no rows were found in System.Activities.DurableInstancing.SqlWorkflowInstanceStoreVersionTable. This table should contain a single row that corresponds to the version of the framework that it was created with or upgraded to. at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.Activities.DurableInstancing.SqlWorkflowInstanceStoreAsyncResult.End(IAsyncResult result) at System.Activities.DurableInstancing.PersistenceTask.CommandCompletedCallback(IAsyncResult result)System.InvalidOperationException: The version of the database cannot be determined as no rows were found in System.Activities.DurableInstancing.SqlWorkflowInstanceStoreVersionTable. This table should contain a single row that corresponds to the version of the framework that it was created with or upgraded to. at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.Activities.DurableInstancing.SqlWorkflowInstanceStoreAsyncResult.End(IAsyncResult result) at System.Activities.DurableInstancing.PersistenceTask.CommandCompletedCallback(IAsyncResult result)

When i check System.Activities.DurableInstancing.SqlWorkflowInstanceStoreVersionTable, its empty. However this table was always been empty. This issue is happening on Development server ( where we ran windows update that installed .NET 4.7)

We also have other environments Staging and Production, where windows updates are not installed yet. I checked SqlWorkflowInstanceStoreVersionTable on these server and indeed the table is empty however Workflow is running fine without any issue on these servers

Upvotes: 0

Views: 523

Answers (1)

Abhay Garg
Abhay Garg

Reputation: 159

You might want to go through this link for migration of your .net framework

https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/runtime/4.6.2-4.7

Upvotes: 1

Related Questions