Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the 1.5 GB memory limit in Azure Functions limited to the entire Function App or per function invocation?

I'm setting up an Azure Function app that has multiple timer triggers that are triggered at or around the same time. I'm confused by the wording here: https://learn.microsoft.com/fi-fi/azure/azure-functions/functions-scale

Each instance of the Functions host in the Consumption plan is limited to 1.5 GB of memory and one CPU. An instance of the host is the entire function app, meaning all functions within a function app share resource within an instance and scale at the same time.

Does that mean that each script that is executed with a timer trigger is allocated 1.5 GB of memory or does that mean that all of the scripts share 1.5 GB of memory that are running at the same time?

like image 716
ddx Avatar asked Mar 03 '23 09:03

ddx


1 Answers

Plan is a virtual concept, it is basically based on virtual machines. plan provides the scale of computing resources that you can deploy. When you deploy an application or function on a plan, it will use a portion of the computing resources, and the total computing resources that you can deploy are based on how many computing resources the plan you choose provides. If you want more computing resources or memory, please choose premium plan or App Service Plan.

The premium plan provides three pricing tiers: https://learn.microsoft.com/fi-fi/azure/azure-functions/functions-premium-plan#available-instance-skus If you choose App Service Plan, you have more options

This is obviously impossible for each trigger to have 1.5gb of memory. It means that your function app can use 1.5gb. If you need more memory, you need to choose premium plan or app service plan and select the corresponding pricing tier.

like image 126
Cindy Pau Avatar answered Mar 05 '23 01:03

Cindy Pau