First time implementing Durable Functions as we basically one HttpTrigger that might take up to 3-5 minutes to complete. Therefore we looked into the AsyncHttp pattern which seemed like what we needed. Managed to successfully implement the pattern and it functionality-wise it works. However it came to our attention that the memory consumption now seems a bit odd. As you can tell from the screenshot it is pretty clear when we made the change to Durable Functions. It even triggered a warning in App Insights about a potential memory leak. Question is now whether it is a bug, expected behavior or user-error. Using default configuration.
Expected behavior
Memory consumption to stay within range of before implementing Durable Functions
Actual behavior
Memory consumption appears to be steadily rising - even when the Durable Function isn't invoked.
Relevant source code snippets
Example of the use of AsyncHttp patttern
[FunctionName("ApproveMemberChangeRequestStart")]
public async Task<AsyncHttpResponse> ApproveChangeRequestStart([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "members-change-request/{ik}/approve")] HttpRequestMessage req, string ik, [DurableClient] IDurableOrchestrationClient starter)
{
var userIdentity = _userService.GetUserIdentity();
var instanceId = await starter.StartNewAsync("ApproveMemberChangeRequestOrchestrator", new ApproveChangeRequestInput(ik, userIdentity));
return new AsyncHttpResponse(instanceId);
}
[FunctionName("ApproveMemberChangeRequestOrchestrator")]
public static async Task RunApproveChangeRequestOrchestrator([OrchestrationTrigger] IDurableOrchestrationContext context)
{
var input = context.GetInput<ApproveChangeRequestInput>();
try
{
await context.CallActivityAsync("ApproveMemberChangeRequest", input);
} catch (Exception ex)
{
context.SetCustomStatus(ex.InnerException?.Message);
throw;
}
}
[FunctionName("ApproveMemberChangeRequest")]
public async Task ApproveChangeRequest([ActivityTrigger] ApproveChangeRequestInput input)
{
await _changeRequestService.Approve(input.Ik, input.UserIdentity);
}
Known workarounds
None
App Details
Durable Functions extension version (e.g. v1.8.3): 2.10.0 (also tried 2.11.1)
Azure Functions runtime version (1.0 or 2.0): 2.0
Programming language used: C#
Screenshots
If deployed to Azure
We have access to a lot of telemetry that can help with investigations. Please provide as much of the following information as you can to help us investigate!
Timeframe issue observed:
Function App name:
Function name(s):
Azure region:
Orchestration instance ID(s):
Azure storage account name:
If you don't want to share your Function App or storage account name GitHub, please at least share the orchestration instance ID. Otherwise it's extremely difficult to look up information.
Description
First time implementing Durable Functions as we basically one HttpTrigger that might take up to 3-5 minutes to complete. Therefore we looked into the AsyncHttp pattern which seemed like what we needed. Managed to successfully implement the pattern and it functionality-wise it works. However it came to our attention that the memory consumption now seems a bit odd. As you can tell from the screenshot it is pretty clear when we made the change to Durable Functions. It even triggered a warning in App Insights about a potential memory leak. Question is now whether it is a bug, expected behavior or user-error. Using default configuration.
Expected behavior
Memory consumption to stay within range of before implementing Durable Functions
Actual behavior
Memory consumption appears to be steadily rising - even when the Durable Function isn't invoked.
Relevant source code snippets
Example of the use of AsyncHttp patttern
Known workarounds
None
App Details
Screenshots
If deployed to Azure