.Net 8 Isolated Durable function stuck in Pending/Running state

Rahul Shete 0 Reputation points
2024-09-02T16:29:23.8833333+00:00

I have migrated .net 3.1 durable function app to .net 8 isolated. Function is working fine in local but when its deployed to azure then orchestrator function showing always in pending / running state.
Function Run time version ~4, .Net 8 isolated. Application insight it is not showing exceptions/ no other traces found. All nuget packages are updated corrected with .net 8 isolated.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,890 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,798 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. youzeliang 480 Reputation points
    2024-09-03T16:02:51.88+00:00

    When migrating a Durable Function from .NET 3.1 to .NET 8 in an isolated environment, there are several aspects you should verify and troubleshoot to address the issue of the orchestrator function being stuck in a Pending/Running state:

    1. Function Runtime Configuration:
    • Ensure that the Azure Functions runtime version is correctly set to ~4, as you're using .NET 8, which is compatible with Azure Functions v4. Double-check the configuration in your host.json and the Azure portal.
    1. Orchestrator and Activity Function Registration:
    • In the isolated process model, the way you register and handle orchestrator and activity functions might differ slightly. Ensure that all orchestrator and activity functions are correctly registered and invoked. Ensure that you are correctly setting up the IDurableOrchestrationClient and IDurableOrchestrationContext as needed.
    1. Connection Strings and Settings:
    • Verify that all the connection strings (e.g., Storage, Service Bus, etc.) and application settings are correctly configured in Azure. Misconfiguration can lead to functions not being able to update their status.
    1. Durable Task Hub:
    • Check if the Durable Task Hub (which is usually stored in Azure Storage) is correctly set up and accessible. The orchestration status is managed here, and issues with the hub can cause the orchestrator to hang.
    1. Logs and Application Insights:
    • Since no exceptions or logs are showing up in Application Insights, ensure that logging is correctly configured for the isolated process model. You may need to manually configure logging in Program.cs to ensure that traces and exceptions are captured.When migrating a Durable Function from .NET 3.1 to .NET 8 in an isolated environment, there are several aspects you should verify and troubleshoot to address the issue of the orchestrator function being stuck in a Pending/Running state:
      1. Function Runtime Configuration:
      • Ensure that the Azure Functions runtime version is correctly set to ~4, as you're using .NET 8, which is compatible with Azure Functions v4. Double-check the configuration in your host.json and the Azure portal.
      1. Orchestrator and Activity Function Registration:
      • In the isolated process model, the way you register and handle orchestrator and activity functions might differ slightly. Ensure that all orchestrator and activity functions are correctly registered and invoked. Ensure that you are correctly setting up the IDurableOrchestrationClient and IDurableOrchestrationContext as needed.
      1. Connection Strings and Settings:
      • Verify that all the connection strings (e.g., Storage, Service Bus, etc.) and application settings are correctly configured in Azure. Misconfiguration can lead to functions not being able to update their status.
      1. Durable Task Hub:
      • Check if the Durable Task Hub (which is usually stored in Azure Storage) is correctly set up and accessible. The orchestration status is managed here, and issues with the hub can cause the orchestrator to hang.
      1. Logs and Application Insights:
      • Since no exceptions or logs are showing up in Application Insights, ensure that logging is correctly configured for the isolated process model. You may need to manually configure logging in Program.cs to ensure that traces and exceptions are captured.

    If my answer is helpful to you, you can accept it. Thank you.

    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.