Function app gives OutOfMemory error

Pati, Sudeepta 1 Reputation point
2022-07-18T16:01:02.603+00:00

I am developing a Azure function in Java. I am able to test it in local using eclipse and Microsoft Core tools. My app connects to a container and reads few files from it and generates an excel report. The excel report is around 5 Mb -7 Mb. All are working fine in local, but when I publish it to Azure portal and try to test it from portal ,it shows me OutOfMemory error.. Some times it gives me time out . I have set the time out to 10 min in Json and the function in local not takes more than one minute.
I am using consumption plan. I suspect the issue is because I am trying to write excel.But I need to write it to excel as I need to send the report to customer. Kindly help. DO I have to upgrade my consumption plan to appserviceplan?

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

1 answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,441 Reputation points
    2022-07-19T05:11:19.787+00:00

    Hi @Pati, Sudeepta ,

    Thanks for reaching out to Q&A forum.

    Looking at this issue from a Functions platform perspective, consumption plan SKU only has 1.5 gb RAM however your local machine might have more memory. You can look at the memory utilzation of your local machine when running the Function app and get a fair idea of the memory usage. Based on that you can choose an appropriate SKU (dedicated or premium).

    You can also choose the Platform bitness to 64 bit in the general settings and see if that helps

    222053-image.png

    If the memory utilization in your local machine is less than 1.5 gb and you still see the out of memory exception in Functions, please let me know. We can troubleshoot further

    1 person found this answer helpful.
    0 comments No comments