Runtime version (e.g. net461, net48, netcoreapp2.1, netcoreapp3.1, etc. You can find this information from the *.csproj file):
<TargetFramework>net8.0</TargetFramework>
Hosting environment (e.g. Azure Web App, App Service on Linux, Windows, Ubuntu, etc.):
Azure Function Isolated Premium x86
Describe the bug
Azure Function application with an x86 environment (and ~2GB of process memory) crashed due to an OutOfMemoryException.
Analyzing the full memory dump shows that memory consists of too many strings (1.5GB) which are referenced by App Insights. We have some code, a simplified version is below, and we failed to properly set up the client configuration, resulting in a while loop without any delay. As a result, it looks like App Insights can't send logs, but new logs are incoming.
A possible fix is to create a "MaxPendingLogsSize" option in the App Insights library and try to send only some of them.
List of NuGet packages and version that you are using:
Runtime version (e.g. net461, net48, netcoreapp2.1, netcoreapp3.1, etc. You can find this information from the
*.csproj
file):Hosting environment (e.g. Azure Web App, App Service on Linux, Windows, Ubuntu, etc.):
Describe the bug
Azure Function application with an x86 environment (and ~2GB of process memory) crashed due to an OutOfMemoryException.
Analyzing the full memory dump shows that memory consists of too many strings (1.5GB) which are referenced by App Insights. We have some code, a simplified version is below, and we failed to properly set up the client configuration, resulting in a while loop without any delay. As a result, it looks like App Insights can't send logs, but new logs are incoming. A possible fix is to create a "MaxPendingLogsSize" option in the App Insights library and try to send only some of them.
I still have dump.
To Reproduce