azure-functions-dotnet-worker: EventSource FunctionsEventSource throws 'System.OutOfMemoryException'
Hello,
after upgrading some functions that consume event-hubs to the isolated variant with .NET 6 and Azure Functions 4, there is a strange behavior.
I keep on seeing this log entry in application-insights:
AI (Internal): [FunctionsEventSource] ERROR: Exception in Command Processing for EventSource FunctionsEventSource: Exception of type 'System.OutOfMemoryException' was thrown.
Interstingly, the function executions are not reported to Application-Insights anymore
When I navigate to the function app and press on monitor -> application insights, I can see that the function is being executed.
I’ve found a similar issue (#7393, #700) but the exceptions mentioned there are a little bit different. As far as I understood, there is no fix for it yet.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 17 (5 by maintainers)
The permanent resolution is that
COMPLUS_GCHeapHardLimit
will be set by the platform so you won’t need to take any action. This rollout may already be complete; we will double-check and report back.I think this is related to https://github.com/Azure/azure-functions-host/issues/7881. Setting the app setting
COMPLUS_GCHeapHardLimit
to0x60000000
fixed the issue for us.I have a similar issue with Azure Durable Function executions. Happy to provide more details when needed.
Azure Runtime version: 4.0.1.16815 Stack: PowerShell Core Platform: 64-bit
Trace Properties Event time 12/7/2021, 6:00:01.085 PM (Local time) Device type PC Message AI (Internal): [FunctionsEventSource] ERROR: Exception in Command Processing for EventSource FunctionsEventSource: Exception of type ‘System.OutOfMemoryException’ was thrown. Severity level Verbose Telemetry type trace Source of synthetic traffic SDKTelemetry Client IP address 0.0.0.0 Role name ********** Role instance 31a6662140fcb4e6b7c1c19c36343205a7192af19bbe1559083a700e1efd25d2 SDK version dotnetc:2.17.0-146 Sample rate 1