Azure / Azure/azure-functions-nodejs-library
Reduce support cases: Memory issues
- Dominant language
- TypeScript
- Stars
- 70
- Forks
- 35
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 6
Description
There can be a lot of causes and solutions here. The most common solutions I saw were:
- Switch from a 32 bit app in Azure to 64 bit
- Use the [max-old-space-size](https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes) node process [argument](https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-node?tabs=javascript%2Clinux%2Cazure-cli&pivots=nodejs-model-v4#languageworkers__node__arguments)
- NOTE on this one: The default heap size in node.js is variable and complicated to determine (some discussion [here](https://stackoverflow.com/questions/64119135/what-is-the-default-value-of-available-memory-when-max-old-space-size-flag-i)). It's not always clear if hard-coding this value would help - plus it means we have to restart the node.js process which can lead to slightly worse cold start
- Scale up the app
- Some docs on premium plan [here](https://learn.microsoft.com/en-us/azure/azure-functions/functions-premium-plan?tabs=portal#memory-usage-considerations)
There were also several that mentioned large file/request sizes that could be helped by our stream support for [http](https://github.com/Azure/azure-functions-nodejs-library/issues/97) or [azure resources](https://github.com/Azure/azure-functions-nodejs-library/issues/99)
## Support cases from June 2023 - Sept 2023
_Internal-only links_:
- https://elixir.microsoft.com/case-review/2307040060001616
- https://elixir.microsoft.com/case-review/2309080040002869
- https://elixir.microsoft.com/case-review/2307240030005058
- https://elixir.microsoft.com/case-review/2308030060000832
- https://elixir.microsoft.com/case-review/2308080040009195
- https://elixir.microsoft.com/case-review/2309060060001518
64 bit:
- https://elixir.microsoft.com/case-review/2309190060002846
- https://elixir.microsoft.com/case-review/2307120060002105
max-old-space-size:
- https://elixir.microsoft.com/case-review/2307250060000443
Contributor guide
Assessment
This issue has not been assessed yet.