Azure / Azure/durabletask

Wakeup issue ?

Open
#384 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.7k
Forks
335
Avg merge
2d 23h
Merged PRs (30d)
6

Description

Hello,

On our team we are using durable task framework to process the launch of different powershell scripts.
We are facing an issue we are not able to understand. Our worker is running 24/7 waiting for commands to be sent, be sometimes, after a long period without any activity, it gets lost.

Any command sent to the worker running durable task framework is lost and we get no reaction from the worker. We need to restart it and all the commands sent while it was in this state are lost.
Are we doing something wrong ?

Here is the part that send the command from the API :
```
var instance = await _workFlowManager.GetClient().CreateOrchestrationInstanceAsync("PowerShellOrchestration",
"V1",
domainEvent.Operation.Id.ToString(),
orchestratorInput);

OrchestrationState taskResult = await _workFlowManager.GetClient().WaitForOrchestrationAsync(instance, TimeSpan.FromSeconds(5), CancellationToken.None);
```

And here is the StartAsync method code for the worker :
```
IOrchestrationServiceInstanceStore instanceStore = new AzureTableInstanceStore(taskHubName, storageConnectionString);

var orchestrationServiceAndClient = new ServiceBusOrchestrationService(serviceBusConnectionString, taskHubName, instanceStore, null, null);

await orchestrationServiceAndClient.CreateIfNotExistsAsync();

_taskHub = new TaskHubWorker(orchestrationServiceAndClient);

_taskHub.AddTaskOrchestrations(new NameValueObjectCreator("PowerShellOrchestration",
"V1",
typeof(CreateOperationOrchestration)));

_taskHub.AddTaskActivities(new ObjectCreator[]
{
new WorkerObjectCreator(typeof(ChangeOperationStatusActivity), _mediatr),
new WorkerObjectCreator(typeof(LaunchPowerShellActivity), _mediatr),
});

await _taskHub.StartAsync();
```

Thank's for your help

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.