Timer Trigger fires up multiple times, with the isPastDue reason

Alessandro Beretta 20 Reputation points
2024-10-18T12:06:07.7733333+00:00

Good morning,

I have an Elastic Consupmtion Plan Function App with two TimerTrigger functions written in .NET and other HTTP trigger functions. There is a problem with one of the two TimerTrigger function.

Looking inside the Azure Application Insights logs, i can see that the function fires up at the expected time (09:00 UTC).immagine

But then there are multiple logs following this one with the following message:

"Trigger Details: UnscheduledInvocationReason: IsPastDue, OriginalSchedule: 2024-10-18T09:00:00.0000000+00:00"

I have tried searching online and testing everything, restarting the function app, redeploying it, adding another active instance, increasing the timeout, but i can't figure out which is the problem, since the function itself does not catch any exceptions, and the other timertrigger function is working flawlessly.

Does anyone have some guidance regarding this message?

Thanks

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

Accepted answer
  1. Khadeer Ali 575 Reputation points Microsoft Vendor
    2024-10-21T01:08:43.1+00:00

    Hi @Alessandro Beretta,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    This error message indicates that your TimerTrigger function is being invoked multiple times due to a scheduling issue. This typically occurs when the function's scheduled execution time is missed or when there are delays in processing the trigger.

    • If your Function App is configured to scale automatically based on demand, it's possible that the instance responsible for processing the trigger is not available at the scheduled time, leading to the "IsPastDue" error. To address this, you can try increasing the minimum number of instances or disabling auto-scaling altogether.
    • TimerTrigger functions use the Singleton feature of the WebJobs SDK to ensure only one instance runs at a time by acquiring a Blob lease. If there are issues with acquiring the lease, it might cause the function to run late. You can disable this behavior by setting 'UseMonitor=false' in your function configuration.
    • Enable Application Insights for your Function App to monitor performance metrics and identify any bottlenecks. If the issue persists, please do not hesitate to reach out further assistance. If you find this answer helpful, please click accept Answer and Yes.

0 additional answers

Sort by: Most helpful

Your answer

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