Azure-functions-host: Timer trigger stopped firing

Created on 19 Jun 2018  路  4Comments  路  Source: Azure/azure-functions-host

A function has a timer trigger set up to run every 5 minutes with the following schedule:
0 1-59/5 * * * *.

It was running consistently every 5 minutes then suddenly stopped for no apparent reason. I was able to get it to start running again by restarting the function app from the Azure portal.

Investigative information

Please provide the following:

  • Timestamp: 2018-06-19T16:26:00.014 (last run before it stopped for over an hour, next run at 2018-06-19T17:48:53.945 )
  • Function App version (1.0 or 2.0-beta): 1.0
  • Function App name: -
  • Function name(s) (as appropriate): VibrantEmailUploader
  • Invocation ID: 2e4fa4d2-1279-4e48-a6cc-002b1424dab7
  • Region: West US

Repro steps

  1. Create function app with a schedule of 0 1-59/5 * * * *
  2. Monitor running executions

Expected behavior

The trigger should fire every 5 minutes.

Actual behavior

Had an incident where the function app stopped executing with no visible error or cause.

Known workarounds

Restarting the function app when it gets stuck

Related information

  • Programming language used: Precompiled C#
  • Deployment method: Webdeploy
  • Links to source: private
  • Bindings used: Timer
  • Timer trigger: [TimerTrigger("0 1-59/5 * * * *", RunOnStartup = true)]

    • Note this function app contains 4 different functions with timer triggers.

    • 3 run every 5 minutes (at minute offset 0, 1, and 2).

    • The last one runs every 30 minutes

  • The function app has ~15 functions all together and is using a combination of the durable functions extension, timer triggers, and HTTP triggers.

Most helpful comment

It was answered here

long story short - there is an issue right now if you deploy timer based functions that are disabled via app setting then change the app setting to enable them. To work around until the fix is made you should click the 'refresh' button in the Azure portal after changing app settings used for disabling functions.

All 4 comments

I have related issue. I've got functions with service bus triggers, event hub triggers and storage queue triggers that works just fine. In the same deployment there are also a couple of timer triggers that should fire once every 30 minutes. But they sometime go hours without fireing. No apparent logic in when they work and when the take a long vacation.

Is there a reason you're doing "RunOnStartup"?
We almost never recommend using that, especially on consumption plans. Please see here for details on the attribute: https://github.com/Azure/azure-webjobs-sdk-extensions/issues/315

@mhoeger I only have that set as a development aid so it is easier to run locally. Due to the nature of these functions essentially polling available inputs there isn't really any problem with running "extra" times beyond the scheduled instances, as long as that is the only issue with RunOnStartup on consumptive plans.

It was answered here

long story short - there is an issue right now if you deploy timer based functions that are disabled via app setting then change the app setting to enable them. To work around until the fix is made you should click the 'refresh' button in the Azure portal after changing app settings used for disabling functions.

Was this page helpful?
0 / 5 - 0 ratings