Azure / Azure/azure-functions-dotnet-worker
Azure function stops processing due to Host Monitor Thresholds "Sections" being exceeded
- Dominant language
- C#
- Stars
- 466
- Forks
- 215
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 7
Description
#### Investigative information
- Timestamp: 2021-06-25T19:59:16.1806544Z
- Function App version: 3.0.15733.0
- Runtime: dotnet-isolated
- SDK: .NET 5
- Functions library: Microsoft.Azure.Functions.Worker v1.2.0
- Operation ID: 93ededf34dbb5840a8a033f47224334c
- Region: eastus
- Plan: Consumption, Windows
- Running as package
- InvocationId (Not related to error but providing per the requested info): 04472dcc-1fce-45a4-8b47-db7bfc47fd36
#### Repro steps
Create an azure function using the Microsoft.Azure.Functions.Worker libraries that listens on an event hub and outputs to an event hub. Reviewing the diagnostics, we can see that a "Sections" threshold is being reached.

Reviewing the [Host Health Monitor](https://github.com/Azure/azure-functions-host/wiki/Host-Health-Monitor) for a resolution points to this being related to file create operations for NamedSharedMemory. We're unsure how we're causing this as we do not have any file operations within our functions, we're only using the Microsoft.Azure.Functions.Worker libraries.
#### Expected behavior
Function should execute without issue.
#### Actual behavior
We have an Azure function listening on an event hub that modifies some data and outputs to another event hub. After some time this function will stop processing
#### Known workarounds
Upgrading to a Premium plan resolves this, but is an expensive workaround.
#### Related information
Provide any related information
C# language
Source
```csharp
[Function("TelemetryProcessor")]
[EventHubOutput("timeserieshub", Connection = "OutputEventHubConnectionString")]
public IEnumerable Run(
[EventHubTrigger("timeseriesprochub", Connection = "InputEventHubConnectionString")] IEnumerable eventsJson,
FunctionContext context)
{
var logger = context.GetLogger("TelemetryProcessorFunction");
List outputMessages = new List();
try
{
foreach(var eventJson in eventsJson)
{
//do some data manipulation on the json
var outputMessage = _telemetryProcessor.Process(eventJson);
outputMessages.Add(outputMessage);
}
}
catch (Exception e)
{
logger.LogError(e, "Error occurred while processing event: {0}", eventsJson);
}
return outputMessages;
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.