azure-functions-host icon indicating copy to clipboard operation
azure-functions-host copied to clipboard

Function App on TimerTrigger does not fire on the hour every hour

Open danpetitt opened this issue 2 years ago • 6 comments

We have a function set to run on a timer trigger on the hour; however some hours it fires a few seconds early and other hours it does not fire at all as can be seen in this screenshot, you can see that nothing was fired at all at 21:00 last night, or 1am or 8am this morning

We are relying on this firing accurately on the hour, even if its a few seconds late is okay so long as its on the hour before the minute past; but certainly not early or missing completely.

We are running the app in our App Service Environment and it is set to "Always On".

image

Investigative information

Please provide the following:

  • Timestamp: 2022-03-22 21:00 / 2022-03-23 01:00 / 2022-03-23 05:00 / 2022-03-23 08:00
  • Function App version: Runtime Version ~2
  • Function App name: PawaDatabaseJobs
  • Function name(s) (as appropriate): timed-exports
  • Invocation ID: obviously havent got one for missing invocations, but here is one for one just before: Executing 'Functions.timed-exports' (Reason='Timer fired at 2022-03-23T04:59:59.9963753+00:00', Id=d30761f4-cd5b-4b4f-9650-824ae31df011)
  • Region: North Europe

Repro steps

Not really reproducible, but you can see the issue in the screenshot and the bindings below.

Expected behavior

A timer trigger is fired on the hour every hour.

Actual behavior

The timer is not firing every hour and sometimes its a few seconds before, but the missing triggers are the most important.

Related information

Provide any related information

  • Programming language used : Node
  • Links to source
  • Bindings used:
  "bindings": [
    {
      "name": "EveryHour",
      "type": "timerTrigger",
      "direction": "in",
      "schedule": "0 0 * * * *"
    }
  ],

danpetitt avatar Mar 23 '22 10:03 danpetitt

Hi @danpetitt Thank you for the feedback. we will discuss this issue internally and let you know about the findings soon!

Ved2806 avatar Mar 29 '22 13:03 Ved2806

How long does it take to run ?

anirudhgarg avatar Apr 01 '22 02:04 anirudhgarg

@anirudhgarg between 1 and 3 seconds (see below); would it be affected by length of time any other functions running on the same app would be taking as I havent checked that, but I dont expect anything to be taking hours to run...

image

danpetitt avatar Apr 01 '22 09:04 danpetitt

Hi @danpetitt, we are discussing this issue internally, we will let you know about the findings soon

Ved2806 avatar May 17 '22 12:05 Ved2806

Hi @danpetitt, have you got any lead on this? I'm facing a similar issue image

Hi @Ved2806, have you guys reached to any conclusions after internal discussions?

I have multiple timer triggers, all 3 of them (scheduled to run every hour) are behaving weirdly (not firing every hour) similar to the above mentioned issue.

Yash-Poddar avatar Jul 13 '22 19:07 Yash-Poddar

@Yash-Poddar nope, heard nothing from this thread and support just went quiet and haven't heard a thing. Contemplating moving it to aws which appears much more reliable which is a shame as we spend over £20k per month with azure

danpetitt avatar Jul 13 '22 21:07 danpetitt