Azure Function (Python) suddenly stopped getting loaded

Lóránd Balog 0 Reputation points
2025-08-28T14:01:04.6533333+00:00

We have two very similar Azure Function instances which both stopped working correctly in the last 24 hours, seemingly without any interaction.

Setup:

  • 2 Azure Function Apps, both Consumption plan (very similar setup, only slight differences in the function code)
  • 2 functions in each Function App (HTTP trigger)
  • Python + Linux
  • Runtime: 4.1042.100.1
  • Deployment: the functions were deployed through the Azure portal, almost 2 months ago This setup has been working perfectly for quite some time. However, today we received reports which suggested that the endpoints are no longer reachable.

Symptoms:

  • Function endpoints return 404
  • In the Azure portal, the functions are no longer visible in the Function Apps
  • If I try to create a new function using the Azure Portal, the wizard completes successfully, but the state remains the same: no functions are visible, and no endpoints are reachable.
  • In the Azure portal, if I go to Functions --> App files, only the host.json file is visible.
  • However, in the corresponding File Share (that stores the sources), I can see both the host.json as well as a function_app.py, that contains the 2 "lost" functions. (But no trace of the newly created ones that I mentioned above)
  • If I execute the following query on the Function App:
      traces
      | where message contains "functions loaded"
    
    I can see the exact time when the functions stopped loading:
    User's image
    As well as the following message:
    No functions were found. This can occur before you deploy code to your function app or when the host.json file is missing from the most recent deployment. Make sure that your deployment package includes the host.json file in the root of the package. For deployment package requirements, see https://aka.ms/functions-deployment-technologies.

I tried creating an exact replica of the Function App, using the very same function_app.py file that was in the File Share (that supposedly could not be loaded), but that is working as expected, the two functions are loaded without issues.

So now I'm absolutely puzzled, and feel like I ran out of leads. I don't understand how two untouched Function Apps can get into such a broken state, while the same setup works for newly created instances (and has already been working for months).

Any ides what could be causing this issue?

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

1 answer

Sort by: Most helpful
  1. John Burkholder 0 Reputation points
    2025-08-28T20:40:27.6766667+00:00

    This issue—where your Azure Python Function Apps on Linux Consumption Plan suddenly stopped loading and returning 404s—is affecting others too and seems to stem from a combination of deployment and runtime configuration problems. Here's a consolidated analysis and solution path based on similar cases and Microsoft guidance:


    🔍 Root Causes Identified

    1. Function Discovery Failure
    • The message “No functions were found” typically means the Azure Functions host couldn't discover any valid function definitions during startup [1].
    • This can happen if:
      • The function_app.py file is incorrectly structured.
        • Required metadata like function.json is missing or malformed.
          • The host.json is present but not correctly referencing extensions.
    1. Deployment Package Issues
    • If the deployment was done via the portal or manually, the package might be malformed.
    • Azure expects a specific structure: /host.json /requirements.txt // └── function_app.py └── function.json
    1. Missing or Incorrect App Settings

    Ensure these App Settings are configured in the Function App:

    FUNCTIONS_WORKER_RUNTIME = python
    FUNCTIONS_EXTENSION_VERSION = ~4
    AzureWebJobsStorage = <your_storage_connection_string>
    AzureWebJobsFeatureFlags = EnableWorkerIndexing
    

    Missing or incorrect values here can prevent the host from starting properly[2].

    1. Sync Triggers Failure
    • If trigger sync fails (especially for HTTP triggers), the functions won’t be registered.
    • You can manually run:
    az functionapp sync-functions --name <FunctionAppName> --resource-group <ResourceGroup>
    
    1. Storage Account Access
    • If the Function App loses access to its linked Azure Storage Account, it can fail silently [3].
    • Check that the storage account is active and accessible, and that the connection string is valid.

    Recommended Fixes

    1. Verify App Settings in the Azure Portal under Configuration.
    2. Redeploy using Zip Deploy or Azure CLI to ensure correct structure:
    func azure functionapp publish <FunctionAppName> --python
    
    1. Check Logs in Application Insights or use:
    traces
    | where message contains "functions loaded"
    

    to pinpoint when and why the functions stopped loading.

    1. Run Azure Functions Diagnostics from the portal to auto-detect issues.
    2. Create a fresh Function App and deploy the same code—this has worked for others when the original app was stuck in a broken state [1].

    References

    [1] Azure Function (Python) suddenly stopped getting loaded

    [2] All my functions inside an Azure Function App disappeared in the UI but ...

    [3] Function app runtime issues post deployment - Azure

    0 comments No comments

Your answer

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