Azure Function App Function stopping execution

Dustin Chavez 80 Reputation points
2025-12-17T16:50:54.18+00:00

I have an Azure Function App with a function that takes approximately 10 minutes to execute as it moves files between storage locations. I'm experiencing inconsistent behavior when running multiple invocations concurrently, even though single invocations work perfectly fine.

When I trigger the function once, it executes successfully and completes within the expected timeframe. However, when I trigger 40 invocations of this function, the behavior is very different. Under the Invocations tab in the Azure portal, I only see one successful invocation recorded, even though there should be 40 total invocations showing up. Additionally, based on my application logging, I can confirm that approximately 15 out of the 40 executions actually complete successfully, which doesn't match what the Invocations tab is showing.

I have configured the function with "functionTimeout": "-1" to allow unlimited execution time, and this setting has been working correctly for longer executions in the past. I also have "dynamicConcurrencyEnabled": true. I'm trying to understand why the invocations are stopping early and why there's such a discrepancy between what's shown in the portal versus what my logs indicate.

My questions are: Why are the invocations not appearing in the Invocations tab even though they're executing? Why do only about 15 out of 40 invocations complete when run concurrently? Are there concurrency limits or throttling mechanisms that could be causing this behavior?

We are using EP1 for the app service plan, and it is triggered an event grid event when a blob is created.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2025-12-17T16:51:10.5066667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The behavior you're experiencing with your Azure Function App could be attributed to several factors related to concurrency limits and execution timeouts. Here are some insights:

    1. Invocation Visibility: The discrepancy between the number of invocations recorded in the Azure portal and your application logs could be due to the Azure Functions runtime's handling of concurrent executions. If the function is being triggered by an event grid event, it may be subject to throttling or limits imposed by the Azure Functions service, especially if the function is taking a long time to execute.
    2. Concurrency Limits: Azure Functions have built-in concurrency limits, which can affect how many instances of a function can run simultaneously. For the Consumption plan, the default limit is typically set to a maximum of 200 concurrent executions, but this can vary based on the plan you are using. Since you mentioned using the EP1 plan, you may want to check the specific concurrency limits associated with that plan.
    3. Execution Timeouts: Although you have set "functionTimeout": "-1", which allows for unlimited execution time, there are still other factors that could lead to early termination of function executions. For example, if the function is being invoked via HTTP, the Azure Load Balancer has a maximum idle timeout of 230 seconds, which could affect long-running HTTP-triggered functions. Additionally, if the function app is under heavy load, it may not be able to allocate resources for all concurrent invocations, leading to some executions being dropped.
    4. Scaling Behavior: The Azure Functions platform may not scale out quickly enough to handle the burst of 40 concurrent invocations, especially if each invocation is resource-intensive. You might want to consider implementing Durable Functions or using an asynchronous pattern to manage long-running tasks more effectively.

    To summarize, the issues you're facing could be due to concurrency limits, execution timeouts, and scaling behaviors of your Azure Function App. It may be beneficial to monitor the performance metrics and logs to identify any specific errors or throttling events that could provide further insights into the problem.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.