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
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