Increase node heap memory size in azure httptrigger function

Indranil Mondal 21 Reputation points

I'm creating serverless httptrigger function in azure. And then I execute the function by http get call.

My function executes just fine. But if during runtime there is too many data loaded then I get JavaScript heap out of memory error.

In my local env if I get the issue I can increase the heap size by the command


But how I can do the same in the azure environment?
Is there any way to connect the azure environment by command line?
Or in the azure UI do we have any option to set up the heap size for azure env?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,190 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vidya Narasimhan 2,201 Reputation points Microsoft Employee

    Hi @Indranil Mondal ,

    Please review these memory limits for your functions based on the plan you have chosen

    Resource Consumption plan Premium plan Dedicated plan ASE
    Max memory (GB per instance) 1.5 3.5-14 1.75-14 3.5 - 14

    For example, if you are using consumption plan, you will hit a memory issue when approaching consumption near 1.5 GB . Please choose the appropriate and SKU based on your memory requirements

1 additional answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,411 Reputation points

    Hi @Indranil Mondal ,

    Thanks for reaching out to Q&A.

    As @Vidya Narasimhan mentioned, the memory limit of an app running on consumption plan is 1.5 gb and it appears that your app is hitting that limit. You can confirm it by running the memory analysis detector present in the diagnose and solve problems blade in functions portal.

    You can try changing the bitness of the app to 64 bit and see if that helps.


    Feel free to reach out to me if you have any queries or concerns.

    1 person found this answer helpful.
    0 comments No comments