azure-functions-core-tools
azure-functions-core-tools copied to clipboard
High memory usage when posting a ~77mb payload to a HTTP trigger.
When posting a large payload (around 77mb of data) to a http trigger, node will use around 988mb on my machine.
As we have set limits on our k8s pods, the pods will be shutdown because it has ran out of memory. A workaround is that we increased the limits of the pods.
POST http://localhost:7071/api/script HTTP/1.1
content-type: application/json
{"payload": ["77mb of data"]}
results in:
[2024-03-26T07:41:55.911Z] Rss: 988mb (lowest: 61mb, highest: 988mb)
[2024-03-26T07:41:56.011Z] Rss: 988mb (lowest: 61mb, highest: 988mb)
[2024-03-26T07:41:56.112Z] Rss: 988mb (lowest: 61mb, highest: 988mb)
[2024-03-26T07:41:56.211Z] Rss: 988mb (lowest: 61mb, highest: 988mb)
[2024-03-26T07:41:56.311Z] Rss: 988mb (lowest: 61mb, highest: 988mb)
[2024-03-26T07:41:56.411Z] Rss: 988mb (lowest: 61mb, highest: 988mb)
[2024-03-26T07:41:56.511Z] Rss: 988mb (lowest: 61mb, highest: 988mb)
[2024-03-26T07:41:56.611Z] Rss: 988mb (lowest: 61mb, highest: 988mb)
[2024-03-26T07:41:56.711Z] Rss: 988mb (lowest: 61mb, highest: 988mb)
[2024-03-26T07:41:56.811Z] Rss: 988mb (lowest: 61mb, highest: 988mb)
[2024-03-26T07:41:56.911Z] Rss: 988mb (lowest: 61mb, highest: 988mb)
Reproduction repository: https://github.com/vanwijnengroep/issue-azure-function-memory-usage
| package | version |
|---|---|
| azure-functions-core-tools | 4.0.5611 |
| node | 18.16.1 |
| os | Linux vw-kevin 6.1.0-18-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux |