Share via

Service Bus Azure Function repeatedly fails with timeout when trying to start a Durable Functions Orchestration

David Faivre - PCS 1 Reputation point
2025-10-24T14:27:44.32+00:00

Service Bus Azure Function repeatedly fails with timeout when trying to start a Durable Functions Orchestration

We have a service bus function that listens for a service bus message, and starts a durable function orchestration. It will, maybe a couple times a die, start repeatedly failing with timeout RpcExceptions, assumedly when calling the underlying functions runtime. From the Azure troubleshooting, it looks like there are "Port 4001 in use errors" that would also point to the Azure Functions runtime failing. The only way to fix it is to restart the entire Functions App.

Time period: 2025-10-23 – 8:15 AM - 3:00PM US/Chicago/Central Time

In the logging below - we restarted the Functions App at ~8:50AM and ~3:00PM. The auto scale instance spikes are, I assume, the Service Bus functions starting a bunch of Durable Orchestrations.

It seems like we scale down to one auto scale instance, that instance's functions runtime dies and can't restart, then our functions become stuck until we restart. When multiple instances are running, it seems more robust, since as long as there is at least one instance with the functions runtime healthy, it can push through Orchestration starts.

NOTE - I can provide some error log screen shots/etc, but it isn't letting me include them.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


1 answer

Sort by: Most helpful
  1. Pashikanti Kumar 1,725 Reputation points Microsoft External Staff Moderator
    2025-10-24T19:45:16.0966667+00:00

    Hi David Faivre - PCS,

    Confirm Durable Functions Extension Version

    • Verify the version of the Microsoft.Azure.WebJobs.Extensions.DurableTask NuGet package in your project.
    • If the version is below 2.11.2, upgrade it using the following command:
    dotnet add package Microsoft.Azure.WebJobs.Extensions.DurableTask --version 2.11.2
    
    
    
    • Redeploy the Function App after upgrading.

    If runtime crashes persist, consider separating the Service Bus trigger and Durable orchestrator into different Function Apps for better reliability.

    • Use the Durable Functions HTTP API to start orchestrations from the Service Bus trigger.
    • Example flow:

    Function App 1: Service Bus trigger processes the message and sends an HTTP POST request to the Durable Functions orchestrator.

    Function App 2: Durable Functions orchestrator handles the orchestration logic.

    Optimize Service Bus trigger settings in host.json.

    If runtime issues persist, consider separating Service Bus trigger and Durable orchestrator into different Function Apps.

    Use Application Insights to monitor and diagnose runtime health.

    Kindly let us know if the above helps or you need further assistance on this issue.

    Please "Upvote" if the information helped you. This will help us and others in the community as well.

    Thanks

    Was this answer helpful?

    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.