azure-functions-host icon indicating copy to clipboard operation
azure-functions-host copied to clipboard

Memory issue observation

Open rich-mond opened this issue 3 years ago • 4 comments

Is your question related to a specific version? If so, please specify:

V4 + .net 6 + consumption plan + 64bit

What language does your question apply to? (e.g. C#, JavaScript, Java, All)

C# 10

Question

Are there memory issues/known issues with azure functions v4 + .net 6 on consumption plan?

Migration from a .net 5 v3 function has uncovered out of memory exceptions that were not present before.

The function in question is memory heavy, using the imagesharp library to create images from a larger composite.

rich-mond avatar Nov 14 '21 22:11 rich-mond

Hi @rich-mond, Thank you for your feedback! We will check for the possibilities internally and update you with the findings.

v-bbalaiagar avatar Nov 16 '21 09:11 v-bbalaiagar

I believe I've run across a similar issue; same stack (.NET 6, v4 Functions Host).

One very curious thing, when setting AZURE_FUNCTIONS_ENVIRONMENT to Development, I don't get the OOM exceptions, but when set to Production, I do.

We had also recently moved back to Consumption Plan (Y1) from Premium, so we have less headroom. Memory usage in AppInsights only shows a few 100MB used however.

kirk-marple avatar Jan 05 '22 01:01 kirk-marple

Hi @kirk-marple and @rich-mond do you have any example that demonstrates the issue? The sample code will be very helpful for investigating the root of the problem.

Shazhko-Artem avatar Jan 12 '22 13:01 Shazhko-Artem

Hi, same here with a linux + node runtime.

Tested on ~3 runtime + node 14 and ~4 runtime + node 16. It fails in both cases I've tested the code to pass without error when constrained under 150MB on local but it fails constantly with error 137 on azure. The code is filtering and sorting a ~200k string array of url strings, then convert it to a set then back to an array

KuSh avatar Jul 05 '22 15:07 KuSh