Azure Function App (Python 3.11 on Linux) stopped detecting all functions after Flex Consumption update – even Basic plan does not work

Insitely 0 Reputation points
2025-11-30T15:39:13.7866667+00:00

Hi everyone,

I’m running into a blocking issue with a Python 3.11 Azure Function App on Linux.

Until this week my Function App contained three HTTP-triggered Python functions and everything worked perfectly. After Microsoft rolled out the new Flex Consumption infrastructure, the Azure Portal suddenly shows no functions at all. The “Functions” blade is completely empty and the runtime no longer detects any triggers.

To troubleshoot I tried the following:

  1. Stayed on Flex Consumption → no functions detected

Switched to a Basic App Service Plan → still no functions detected

Tested both folder structures:

A single function_app.py at the root

  Each function in its own folder with `__init__.py` + `function_app.py`
  
  Redeployed multiple times (ZIP deploy, VS Code deploy, GitHub Actions)
  
  Confirmed Python version is still 3.11
  
  Created a completely new Function App → same issue
  

Still, the runtime loads zero functions, not even a minimal test like “ping”.

My questions:

What is the correct folder structure for Python on Linux now? Has Microsoft changed the requirements with the new Flex Consumption rollout?

Which setting could cause the Python worker to stop scanning for functions? (e.g. WEBSITE_RUN_FROM_PACKAGE, worker version, app settings…)

Are there known issues with Python on the new Flex Consumption plan?

Why does the same code also fail to load under a Basic plan? I’m fine running my Function App on Basic if that solves it — I just want the runtime to detect the functions again.

Can someone provide a minimal working folder layout for a Python 3.11 HTTP-triggered Function (Linux), valid today?

Context:

Language: Python 3.11

OS: Linux

Plan tried: Flex Consumption (new model) → not working, Basic → also not working

Deployment: ZIP deploy (no Docker)

Previously working code now loads 0 functions according to the portal and runtime logs.

Any help or a minimal working example is highly appreciated.

Thank you!Hi everyone,

I’m running into a blocking issue with a Python 3.11 Azure Function App on Linux.

Until this week my Function App contained three HTTP-triggered Python functions and everything worked perfectly. After Microsoft rolled out the new Flex Consumption infrastructure, the Azure Portal suddenly shows no functions at all. The “Functions” blade is completely empty and the runtime no longer detects any triggers.

To troubleshoot I tried the following:

Stayed on Flex Consumption → no functions detected

Switched to a Basic App Service Plan → still no functions detected

Tested both folder structures:

A single function_app.py at the root

  Each function in its own folder with `__init__.py` + `function_app.py`
  
  Redeployed multiple times (ZIP deploy, VS Code deploy, GitHub Actions)
  
  Confirmed Python version is still 3.11
  
  Created a completely new Function App → same issue
  

Still, the runtime loads zero functions, not even a minimal test like “ping”.

My questions:

What is the correct folder structure for Python on Linux now?
Has Microsoft changed the requirements with the new Flex Consumption rollout?

Which setting could cause the Python worker to stop scanning for functions?
(e.g. WEBSITE_RUN_FROM_PACKAGE, worker version, app settings…)

Are there known issues with Python on the new Flex Consumption plan?

Why does the same code also fail to load under a Basic plan?
I’m fine running my Function App on Basic if that solves it — I just want the runtime to detect the functions again.

Can someone provide a minimal working folder layout for a Python 3.11 HTTP-triggered Function (Linux), valid today?

Context:

Language: Python 3.11

OS: Linux

Plan tried: Flex Consumption (new model) → not working, Basic → also not working

Deployment: ZIP deploy (no Docker)

Previously working code now loads 0 functions according to the portal and runtime logs.

Any help or a minimal working example is highly appreciated.

Thank you!

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

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-11-30T15:39:26.1566667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    It seems you are experiencing issues with your Azure Function App not detecting any functions after the migration to the Flex Consumption plan. Here are some insights that might help you troubleshoot the situation:

    1. Correct Folder Structure: Ensure that your folder structure follows the expected layout for Python Azure Functions. For a single function, you can have a structure like this:
      • function_name/
        • __init__.py
        • function_app.py
      • host.json
      • requirements.txt
      If you have multiple functions, each function should be in its own directory with the same structure.
    2. Settings That Could Affect Detection: Check the following settings that might cause the Python worker to stop scanning for functions:
      • WEBSITE_RUN_FROM_PACKAGE: If this is set to 1, ensure that the package is correctly structured as per Azure Functions requirements.
      • App Settings: Verify that all critical application settings were correctly transferred and that there are no deprecated settings affecting the function detection.
    3. Known Issues: There may be known issues with Python functions on the Flex Consumption plan, especially if the migration was recent. It's advisable to check the Azure Functions documentation for any updates or reported issues regarding the Flex Consumption plan.
    4. Basic Plan Detection: If the same code fails to load under a Basic plan, it could be due to similar underlying issues as with the Flex plan. Ensure that your deployment package is correctly structured and that all necessary dependencies are included.
    5. Minimal Working Example: A minimal working example for a Python 3.11 HTTP-triggered function could look like this:
      • Directory Structure:
        • myfunction/
          • __init__.py (this file can be empty or contain a simple function)
          • function_app.py (this file should define your function)
        • host.json
        • requirements.txt (list any dependencies here)

    Make sure to redeploy your function app after confirming these configurations. If issues persist, consider checking the Azure portal for diagnostics and logs to gather more information about what might be going wrong.


    References:

    0 comments No comments

  2. Siddhesh Desai 655 Reputation points Microsoft External Staff Moderator
    2025-12-01T05:58:28.68+00:00

    Hi Insitely

    Thank you for reaching out to Microsoft Q&A

    __init__.py is no longer required as Functions V2 is being used now.

    Refer: https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-python?tabs=get-started%2Casgi%2Capplication-level&pivots=python-mode-decorators

    If you want to deploy multiple Function triggers, they should be part of function_app.py file like below:

    My Folder Structure:

    User's image

    function_app.py:

    Add your trigger bindings in the same file with :

    @app.route(route="http_trigger")

    @app.blob_trigger(arg_name="myblob", path="mycontainer"

    import azure.functions as func
    import logging
    
    app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
    
    @app.route(route="http_trigger")
    def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
        logging.info('Python HTTP trigger function processed a request.')
    
        name = req.params.get('name')
        if not name:
            try:
                req_body = req.get_json()
            except ValueError:
                pass
            else:
                name = req_body.get('name')
    
        if name:
            return func.HttpResponse(f"Hello, {name}. This HTTP triggered function executed successfully.")
        else:
            return func.HttpResponse(
                 "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.",
                 status_code=200
            )
    
    
    @app.blob_trigger(arg_name="myblob", path="mycontainer",
                                   connection="siliconstorage09_STORAGE") 
    def BlobTrigger(myblob: func.InputStream):
        logging.info(f"Python blob trigger function processed blob"
                    f"Name: {myblob.name}"
                    f"Blob Size: {myblob.length} bytes")
    
    
    

    host.json:

    {
      "version": "2.0",
      "logging": {
        "applicationInsights": {
          "samplingSettings": {
            "isEnabled": true,
            "excludedTypes": "Request"
          }
        }
      },
      "extensionBundle": {
        "id": "Microsoft.Azure.Functions.ExtensionBundle",
        "version": "[4.*, 5.0.0)"
      }
    }
    

    local.settings.json:

    {
      "IsEncrypted": false,
      "Values": {
        "AzureWebJobsStorage": "",
        "FUNCTIONS_WORKER_RUNTIME": "python",
        "siliconstorage09_STORAGE": "DefaultEndpointsProtocol=https;AccountName=silxxxxx;AccountKey=xxxxxxxxxpQLzg==;EndpointSuffix=core.windows.net"
      }
    }
    
    
    

    requirements.txt:

    azure-functions
    

    After you have changed your folder structure and files to above, you can deploy your function code in the Flex consumption-based Function app by referring to this MS Doc: https://learn.microsoft.com/en-us/azure/azure-functions/flex-consumption-how-to?tabs=azure-cli%2Cazure-cli-publish&pivots=programming-language-python

    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.