I have an Azure Function with two timer triggers and one EventGrid trigger. Periodically, all triggers will just not fire until I go into the Azure Portal and navigate around (no need to manually trigger or click refresh/sync.) Once I view the function in the Portal, the triggers start to work again (timer and EventGrid).
Focusing on the timer trigger, which should run every 30 minutes, I see that it ran just fine up until 14:45 UTC. Then all triggers were skipped/missed for the next few hours until I went into the portal at approx 17:30. At that point, the timer trigger fires, and the logs show:
Trigger Details: UnscheduledInvocationReason: IsPastDue, OriginalSchedule: 2022-12-27T15:15:00.0000000+00:00
The function will run fine for weeks, but then the above behavior happens. In the interim, the code is not changed, no deployments are happening; nothing is changing from a developer perspective to explain the sudden stoppage.
Details:
- Consumption Plan on Linux, Runtime v4.14.0.0
- WEBSITE_TIME_ZONE is not set (not supported on Linux anyway). I did have this set to etc/UTC, but it's ignored on Linux apps.
- CRON expression: "0 15,45 13-21 * * 1-5"
- I expected it to run at 15:15 on a Tuesday (prior successful execution was at 14:45 that day)
- The first past-due invocation id: Timer fired at 2022-12-27T17:30:27.4798501+00:00', Id=e92aa0f6-4107-479f-86d1-a721b7a504b8
- The preceding successful, regularly-scheduled, invocation: Timer fired at 2022-12-27T14:45:00.0013415+00:00', Id=b9e60523-b08a-42e7-84a4-60c11cd2057d
- Missed invocations: 2022-12-27 @ 15:15, 15:45, 16:15, 16:45, 17:15
I've seen the answer from MSFT where another user had the same problem. But the guidance there is just to disable schedule monitoring (ie, ignore the problem?), which doesn't address the issue of the schedule intermittently not being followed.
I've also reviewed the troubleshooting guidance, and I am not seeing anything in the metrics to show heavy resource utilization. All use of async is non-blocking and is proper async end-to-end.