I have a durable azure function (2.0) that calls back on itself for an eternal orchestration, based on this article. Code below. This works fine and runs well for approx 20 minutes (say around 50 iterations). However, after this time it goes to sleep and stops working. If I navigate to the Azure portal and just click on the functions app and click the functions list (i.e. I just click around but don't change any settings or stop/start anything) it suddenly "wakes up" and continues on no problem. There are no errors or issues in the logs, just a indication of the inactive period and then the logs resuming. Am I missing a setting somewhere?
public static async Task Run([OrchestrationTrigger] DurableOrchestrationContextBase ctx, ILogger log)
{
try
{
var config = ctx.GetInput<Config>();
config = await ctx.CallActivityAsync<Config>("GetConfig", null);
await ctx.CallActivityAsync("ProcessDetails", config);
var nextCheckpoint = ctx.CurrentUtcDateTime.AddSeconds(config.PollingIntervalInSeconds);
await ctx.CreateTimer(nextCheckpoint, CancellationToken.None);
ctx.ContinueAsNew(config);
}
catch (Exception ex)
{
log.LogError($"[Error!][Failed with: {ex.ToString()}]");
throw;
}
}
After hitting the refresh button as described by @davidebbo the issue still persists, see log below.
Further update, even though the issue on GitHub appears resolved, I still needed to do the double config setting as indicated below in order to get my function reliable.
{
"version": "2.0",
"extensions": {
"durableTask": {
"HubName": "myHub",
"maxConcurrentActivityFunctions": 10,
"maxConcurrentOrchestratorFunctions": 1
}
},
"durableTask": {
"HubName": "myHub",
"maxConcurrentActivityFunctions": 10,
"maxConcurrentOrchestratorFunctions": 1
},
"functionTimeout": "00:10:00"
}
Now still having issues after much code optimisation, even though metrics look rock solid.