Share via

Queue trigger never fires on Azure Function Flex Consumption (Python v2)

Antimatter 0 Reputation points
2026-05-22T17:08:33.32+00:00

Environment

  • Plan: Flex Consumption
  • Runtime: Python 3.11, v2 programming model (decorator-based)
  • Region: Southeast Asia
  • Deployment: Azure Functions Core Tools v4 (func azure functionapp publish --build local)

Problem

A queueTrigger function never fires. A queue message has been sitting with dequeue count 0 for over 24 hours. The scale controller is not dispatching the message to any worker instance.

What I have verified

  • func publish correctly detects and registers the trigger: my_push_worker - [queueTrigger]
  • syncfunctiontriggers API returns { "status": "success" }
  • IAM roles on the storage account are all correct: Storage Queue Data Contributor, Storage Blob Data Owner, Storage Table Data Contributor ✅
  • AzureWebJobsStorage is correctly configured (tested both managed identity and full connection string) ✅
  • The function executes correctly when invoked manually via Portal Code+Test ✅
  • Host startup logs show my_push_worker listed under Found the following functions
  • Storage account traces show continuous .blob.core.windows.net requests but zero .queue.core.windows.net requests — the host never polls the queue ✅

Scale config always shows:


{

  "alwaysReady": null,

  "instanceMemoryMB": 2048,

  "maximumInstanceCount": 100,

  "triggers": null

}

triggers remains null even after successful func publish and syncfunctiontriggers. The scale controller has no trigger metadata to act on, so it never wakes up the app for queue messages.

Queue trigger decorator (function_app.py):


@app.queue_trigger(

    arg_name="msg",

    queue_name="my-push-jobs",

    connection="AzureWebJobsStorage",

)

def my_push_worker(msg: func.QueueMessage) -> None:

    asyncio.run(_my_push_worker_async(msg))

Note: queue name is hardcoded as a string literal (not a variable) to ensure static analysis picks it up correctly.

host.json:


{

  "version": "2.0",

  "extensionBundle": {

    "id": "Microsoft.Azure.Functions.ExtensionBundle",

    "version": "[4.*, 5.0.0)"

  },

  "extensions": {

    "queues": {

      "maxPollingInterval": "00:00:02",

      "visibilityTimeout": "00:00:30",

      "batchSize": 16,

      "maxDequeueCount": 5,

      "newBatchThreshold": 8

    }

  },

  "functionTimeout": "00:10:00"

}

Question

Is there a known issue with Flex Consumption + Python v2 where syncfunctiontriggers succeeds but triggers in the scale config remains null, causing queue triggers to never fire? Is there an additional step required to register queue trigger metadata with the Flex Consumption scale controller?

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


2 answers

Sort by: Most helpful
  1. kagiyama yutaka 3,415 Reputation points
    2026-05-28T00:20:12.3933333+00:00

    I think Azure does not show that Flex needs always‑ready for queue triggers, and it also does not show any extra step for registering them. the safe move is remote‑build redeploy and sending a new queue message.

    Was this answer helpful?

    0 comments No comments

  2. Sina Salam 29,276 Reputation points Volunteer Moderator
    2026-05-24T13:35:00.41+00:00

    Hello Antimatter,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that your Queue trigger never fires on Azure Function Flex Consumption (Python v2).

    The issue should not be fixed by keeping always-ready enabled. Flex Consumption supports event-driven scale-to-zero, and always-ready instances are optional for reducing cold start latency, not a requirement for queue triggers. The strongest documented corrective path is to remove always-ready, redeploy the Python app using the supported remote build / One Deploy path, clean up AzureWebJobsStorage, and validate the queue trigger using the correct diagnostics. - https://learn.microsoft.com/en-us/azure/azure-functions/flex-consumption-plan, https://learn.microsoft.com/en-us/azure/azure-functions/flex-consumption-how-to

    Using local build for a Python Flex Consumption app is not cool. Microsoft’s Python deployment guidance recommends remote build, and Flex Consumption deployment guidance supports deployment through Core Tools, VS Code, Azure CLI, and One Deploy-based flows. - https://learn.microsoft.com/en-us/azure/azure-functions/python-build-options, https://learn.microsoft.com/en-us/azure/azure-functions/python-build-options

    NOTE: Use the associated links for detail steps and more reading.

    Regarding your questions:

    Does queue trigger on Flex Consumption require always-ready?

    No. Always-ready is optional. Flex Consumption supports scale-to-zero and event-driven scaling. - https://learn.microsoft.com/en-us/azure/azure-functions/flex-consumption-plan, https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue-trigger

    Is triggers: null proof that the queue trigger is not registered?

    No. That field should not be used as the queue trigger registration signal.

    Is there an extra manual trigger registration step required?

    No, not when the app is deployed through supported Azure Functions deployment methods such as Core Tools, VS Code, Azure CLI, or One Deploy-based flows. - https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies, https://learn.microsoft.com/en-us/azure/azure-functions/flex-consumption-how-to

    I hope this is helpful! Do not hesitate to let me know if you have any other questions, steps or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.