I have an SFTP trigger that send the contents to an Azure Function. When Logic App invokes the Function, in the designer view I observe that it fails after 9 minutes. When I look at the Function monitor, I observe that the function is still running. The function is C#. I When the function completes, it logs the difference in DateTime between when it starts and ends. The time printed is about 300 seconds or five minutes. I know this is the limit for the time for a function to run.
This function runs in only 30 seconds on a VM on my five year old computer. Why is performance in Azure Function so poor? Is there anything that can be done to make it perform better?