Linux dotnet-isolated Function hosted on App Service Plan never loads functions in Azure Italy North (error 0 functions loaded)

Michele Bortot 0 Reputation points
2023-11-30T17:14:40.37+00:00

Hi,

I recently moved my whole stack from Azure West Europe to Azure Italy North, everything works as expected except my Linux Functions which never load after deployment or restart.

As a result of this no functions are running and on the home page of the Function app, the section "Functions" has no functions but instead the placeholder "Create functions in your preferred environment" and the call to action to create a new function.

I'm using .Net 8, with a Service Bus queue trigger and a storage account V2; The functions are deployed from Visual Studio.

At an inspection the files of the Function App are as they should be, to check I used SSH and the App files page.

The configuration is

[
  {
    "name": "AzureWebJobsStorage",
    "value": "DefaultEndpointsProtocol=https;AccountName={XYZ};AccountKey={XYZ};EndpointSuffix=core.windows.net",
    "slotSetting": false
  },
  {
    "name": "FUNCTIONS_EXTENSION_VERSION",
    "value": "~4",
    "slotSetting": false
  },
  {
    "name": "FUNCTIONS_WORKER_RUNTIME",
    "value": "dotnet-isolated",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_RUN_FROM_PACKAGE",
    "value": "1",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_USE_PLACEHOLDER_DOTNETISOLATED",
    "value": "1",
    "slotSetting": false
  }
]

I tried:

  • Different .Net Versions (.Net 8 and .Net7)
  • The same function on different app services
  • To add more permissions for the storage account
  • A function with an HTTP trigger instead of a queue trigger

The only way to make the functions work seems to be to deploy it in another region like West Europe or to use a Windows App service plan.

You can find the logs here

In particular, it is interesting the lines:

1 functions found (Custom)
0 functions loaded

Thanks.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
Developer technologies .NET Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Dan Rios 2,015 Reputation points MVP
    2023-11-30T23:10:40.73+00:00

    I’ve come across this exact error a few times but they were for a Python Function (Issue linked).

    In my experience it’s usually come down to some dependencies or libraries that would fail to load silently in the Function but shows NO errors anywhere in Azure. I believe this to be a bug in Azure Functions, or at least lack of insight for consumers to troubleshoot.

    For me I found the Azure Functions Diagnostic tool useful as you can drill down to certain metrics to see if it’s flagging any errors when the Function is trying to load that other logging areas are not showing. Try that and it may point you in the right direction.

    In the Function, go to the Diagnose and solve problems page, and locate the Executions metrics to see if it’s showing any errors to address.

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-diagnostics#find-the-problem-code

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-diagnostics

    Hope this helps, if so please feel free to mark as the answer.


  2. MikeUrnun 9,777 Reputation points Moderator
    2023-12-05T08:06:19.46+00:00

    Hello @Michele Bortot - Thanks for reaching out, and posting on the MS Q&A.

    I've just deployed an isolated dotnet 8 function app targeting Linux OS to the North Italy region without any issues. Based on the logs you've provided, it looks like the deployment is succeeding and the host is running. As such, it doesn't seem like a regional platform issue.

    For resolving the 0 functions loaded issue, it may take some thorough work checking and verifying configurations. Here's an open item by the Functions team: Create documentation that describes how to troubleshoot and fix '0 functions loaded' for a dotnet and a dotnet-isolated app


    Please "Accept Answer" if the answer is helpful so that others in the community may benefit from your experience.

    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.