azure-functions-dotnet-worker: Azure Function host not starting after upgrade to .NET 8 Isolated

I have started the migration of our Azure Functions from .NET 7 Isolated (running OK for several months) to .NET 8 Isolated.

After updating all the packages and making sure it runs locally, I deployed to our existing instance on Azure using the Visual Studio Publish wizard using exactly the same settings that were working for .NET 7 Isolated. image

However, the Function app is not available: image

This instance is running in a Consumption Plan, UK South region. I suspect this issue won’t affect our product Elastic Plan but I can’t risk a deployment.

I have set ‘fileLoggingMode’ to ‘always’ but there are no new logs in C:\home\LogFiles\Application\Functions\Host or C:\home\LogFiles\Application\Functions\Function.

The eventlog.xml has several entries alternating between EventID 2276 and 2294, all with the same BinaryData 02000780: image

According to kb.eventtracker.com:

2294 is recorded when: Each application pool has a managedRuntimeVersion attribute that contains the version of the common language runtime (CLR) that the application pool preloads. If the value in the attribute does not match the installed runtime, the worker process may fail to load

2276 is recorded when: This event is logged when the worker process failed to initialize correctly. and the BinaryData should provide more details via err.exe.

err.exe says that error 02000780 is The file cannot be accessed by the system: image

All of the above points to some issue with the App Service / Function host.

There are other people reporting similar issues: #2075. Something similar seems to have happened before during previous releases of .NET 8: #1644

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 20 (4 by maintainers)

Most upvoted comments

We are also experiencing 503 errors with functions deployed in Europe North and West. We are deploying container images. I’ve tried creating a new function app in Azure and a new function project in Visual Studio with the app still showing 503. We are using mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0 as our base image. We use the Azure Functions for container task in our Azure DevOps release pipeline to deploy. We are using the latest Microsoft.Azure.Functions.Worker and Microsoft.Azure.Functions.Worker.Sdk packages.

@DanRogers99 Are you only experiencing the issue in those regions? It’s possible that NET8 rollout has not been completed to those regions you mentioned. Please follow https://github.com/Azure/azure-functions-dotnet-worker/issues/2075 to track which regions are still in-progress.

I’m happy to report that things are working OK for me since yesterday, both on Consumption Plan and Elastic. UK South.

Thanks for adding this piece of evidence, @abenteuerzeit . I’m hoping someone from the team sees this and provides a solution. I’m still stuck in .NET 7 which wouldn’t be such a big deal if I didn’t have a Blazor project that does benefit a lot from moving to .NET 8 but is currently stuck because of this issue.

I observed that deploying a function app using .NET 8 (LTS) Isolated (Early Access) in the UK South region led to an internal server error. However, when we switched the target to .NET 7, the service operated as expected, and the default page loaded successfully. Further tests using Visual Studio 2022 and VS Code indicated issues with .NET 8 in the UK South region.

When I tried deploying the same setup in the US East region, it worked correctly, indicating that the issue might be region-specific.