Azure Function Time Trigger stops firing after a few days

Basil 1 Reputation point
2021-08-24T16:40:05.913+00:00

I have configured a python time-trigger azure function app that triggers every 5 mins. It works fine but then after about 2 days it stops firing and never fires again. After this I re-built it and the same thing happened again. What is going on?

Here are some of the logs at the time it stops (oldest from bottom):

8/24, 7:29:03 AM - TRACE
0 functions loaded
Severity level:Information

8/24, 7:29:03 AM - TRACE
Loading functions metadata
Severity level:Information

8/24, 7:29:03 AM - TRACE
0 functions loaded
Severity level:Information

8/24, 7:29:03 AM - TRACE
Loading functions metadata
Severity level:Information

8/24, 7:28:38 AM - TRACE
Host lock lease acquired by instance ID '0000000000000000000000001AD908BE'.
Severity level:Information

8/24, 7:28:33 AM - TRACE
Job host started
Severity level:Information

8/24, 7:28:33 AM - TRACE
Host started (16ms)
Severity level:Information

8/24, 7:28:33 AM - TRACE
Host initialized (16ms)
Severity level:Information

8/24, 7:28:33 AM - TRACE
Initializing function HTTP routes No HTTP routes mapped
Severity level:Information

8/24, 7:28:33 AM - TRACE
HttpOptions { "DynamicThrottlesEnabled": false, "EnableChunkedRequestBinding": false, "MaxConcurrentRequests": -1, "MaxOutstandingRequests": -1, "RoutePrefix": "api" }

Severity level:Information
8/24, 7:28:33 AM - TRACE
No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).

Severity level:Warning
8/24, 7:28:33 AM - TRACE
Generating 0 job function(s)

Severity level:Information
8/24, 7:28:33 AM - TRACE
0 functions loaded

Severity level:Information
8/24, 7:28:33 AM - TRACE
FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:powershell

Severity level:Information
8/24, 7:28:33 AM - TRACE
FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:node

Severity level:Information
8/24, 7:28:33 AM - TRACE
FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:java

Severity level:Information
8/24, 7:28:33 AM - TRACE
Loading functions metadata

Severity level:Information
8/24, 7:28:33 AM - TRACE
Starting Host (HostId=nsolo-warmer, InstanceId=987272dd-75e7-4de2-ac39-a07df7c37fa4, Version=3.1.4.0, ProcessId=62, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=~3)

Severity level:Information
8/24, 7:28:33 AM - TRACE
Starting JobHost

Severity level:Information
8/24, 7:28:33 AM - TRACE
SingletonOptions { "LockPeriod": "00:00:15", "ListenerLockPeriod": "00:01:00", "LockAcquisitionTimeout": "10675199.02:48:05.4775807", "LockAcquisitionPollingInterval": "00:00:05", "ListenerLockRecoveryPollingInterval": "00:01:00" }

Severity level:Information
8/24, 7:28:33 AM - TRACE
FunctionResultAggregatorOptions { "BatchSize": 1000, "FlushTimeout": "00:00:30", "IsEnabled": true }

Severity level:Information
8/24, 7:28:33 AM - TRACE
LoggerFilterOptions { "MinLevel": "None", "Rules": [ { "ProviderName": null, "CategoryName": null, "LogLevel": null, "Filter": "<AddFilter>b__0" }, { "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider", "CategoryName": null, "LogLevel": "None", "Fi…

Severity level:Information
8/24, 7:28:33 AM - TRACE
LoggerFilterOptions { "MinLevel": "None", "Rules": [ { "ProviderName": null, "CategoryName": null, "LogLevel": null, "Filter": "<AddFilter>b__0" }, { "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider", "CategoryName": null, "LogLevel": "None", "Fi…

Severity level:Information
8/24, 7:28:33 AM - TRACE
ApplicationInsightsLoggerOptions { "SamplingSettings": { "EvaluationInterval": "00:00:15", "InitialSamplingPercentage": 100.0, "MaxSamplingPercentage": 100.0, "MaxTelemetryItemsPerSecond": 20.0, "MinSamplingPercentage": 0.1, "MovingAverageRatio": 0.25, "SamplingPercentageDecreaseTimeout": "00:02:00", "SamplingPerce…

Severity level:Information
8/24, 7:28:33 AM - TRACE
Host initialization: ConsecutiveErrors=0, StartupCount=3, OperationId=fe6d962f-b171-4d4c-8a27-d23942579ea1

Severity level:Information
8/24, 7:28:33 AM - TRACE
Initializing Host. OperationId: 'fe6d962f-b171-4d4c-8a27-d23942579ea1'.

Severity level:Information
8/24, 7:28:33 AM - TRACE
Initializing Warmup Extension.

Severity level:Information
8/24, 7:28:33 AM - TRACE
FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:powershell

Severity level:Information
8/24, 7:28:33 AM - TRACE
FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:node

Severity level:Information
8/24, 7:28:33 AM - TRACE
FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:java

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,382 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. AnuragSingh-MSFT 20,671 Reputation points
    2021-08-26T11:02:36.823+00:00

    Hi @Basil ,

    Welcome to Microsoft Q&A!

    The most common cause for Azure Functions not getting triggered is that triggers are not synced properly, mainly after updates or when you deploy your updates by referencing an external package. You can sync triggers in one of three ways:

    • Restart your function app in the Azure portal
    • Send an HTTP POST request to https://{functionappname}.azurewebsites.net/admin/host/synctriggers?code=<API_KEY> using the master key.
    • Send an HTTP POST request to https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP_NAME>/providers/Microsoft.Web/sites/<FUNCTION_APP_NAME>/syncfunctiontriggers?api-version=2016-08-01. Replace the placeholders with your subscription ID, resource group name, and the name of your function app.

    More details available here: Trigger syncing

    In case you are still facing this issue, the wiki article below should help to investigate it further - Investigating and reporting issues with timer triggered functions not firing

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


  2. Basil 1 Reputation point
    2021-10-05T19:25:02.583+00:00

    The issue was resolved. I moved the time trigger function app to a new resource group and it seemed to solve it

    0 comments No comments

  3. dattatray Mharanur 1 Reputation point
    2021-12-08T10:24:00.737+00:00

    Always On: Keeps the app loaded even when there's no traffic. When Always On is not turned on (default), the app is unloaded after 20 minutes without any incoming requests. The unloaded app can cause high latency for new requests because of its warm-up time. When Always On is turned on, the front-end load balancer sends a GET request to the application root every five minutes. The continuous ping prevents the app from being unloaded.

    Always On is required for continuous WebJobs or for WebJobs that are triggered using a CRON expression.

    https://learn.microsoft.com/en-us/azure/app-service/configure-common

    0 comments No comments

  4. dattatray Mharanur 1 Reputation point
    2021-12-08T10:24:35.193+00:00

    Always On is required for continuous WebJobs or for WebJobs that are triggered using a CRON expression.

    0 comments No comments