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