Timer triggered Azure Function skips Invocations

Alex Radice 0 Reputation points
2024-07-02T08:05:26.3266667+00:00

We have an Azure Function that uses an App Service Plan with 2 instances. The function is triggered by schedule */15 * * * * * (run every 15 seconds). About once a week we see gaps of 2 to 3 minutes in the invocations, for example on 1st July 2024:

  • Ran at 00:36:15 UTC
  • Ran at 00:36:30 UTC
  • Ran at 00:36:45 UTC
  • Ran at 00:37:00 UTC (invocation ID e87efe29-0210-42b7-a30d-af60a431a264)
  • Ran at 00:40:15 UTC

We have sampling configured in Application Insights so we cannot see this from the Application Insights logs, we can see it from logs that our Application writes to an Azure Storage account (there is too much log data for us to turn sampling off).

The Functions troubleshooter has identified that there was an application restart during the above outage. We had expected that setting out instance count to 2 would prevent restart events from incurring downtime as one instance could be restarted at a time; why is this not the case?

Our Function App runs in UK West and uses runtime version 4.634.1.22670.

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

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 31,126 Reputation points MVP
    2024-07-02T12:47:26.6733333+00:00

    Hello @Alex Radice ,

    welcome to this moderated Azure community forum.

    If the execution of a timer triggered function exceeds the interval time, this will delay the following execution.

    Please see the timer as being a singleton, handling timer events in a linear way.

    See also this blog post with more details.

    Although not tested by me, this Singleton lock behavior could be overruled. Check out if the 'UseMonitor = false' setting works for you.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments