Timer Trigger Function App is Missing Few Runs

789 Views Asked by At

I have a timer trigger Function App ("version": "2.0") in azure which runs every 5 min. Cron Expression Used- 0 */5 * * * *

Its working as expected but sometimes it suddenly stops running. If I disable the function app and re-enable it, its starts working again.

If you see the screenshot below, It stopped working from 2021-04-14 16:54:59.998 to 2021-04-14 20:55:12.139

Any Help will be appreciated.

enter image description here

1

There are 1 best solutions below

0
On

There could be different reasons for this issue and I will suggest you to review the below document to troubleshoot the issue and see if you are able to find the root cause.

Timer triggered function app uses TimerTriggerAttribute. This attribute consists of the Singleton Lock feature which ensures that only a single instance of the function is running at any given time. If any process runs longer than the scheduled timer, the new incoming process waits for the older process to finish and then uses the same instance. If you are using the same storage account across different timer trigger functions then this could be one of the reasons as mentioned here.

The other reason could be a restart and I will suggest you to check the Web App Restart detection section.

https://github.com/Azure/azure-functions-host/wiki/Investigating-and-reporting-issues-with-timer-triggered-functions-not-firing

https://github.com/Azure/azure-webjobs-sdk-extensions/wiki/TimerTrigger#troubleshooting