How to terminate Azure orchestration function instance? Even though the orchestration function is failed the Runtime status of orchestration function is showing as "Running"

Mallikarjuna NALLAGUNDLA 30 Reputation points
2023-08-08T13:44:13.9933333+00:00

Hi,

I am running orchestration function and inside it I am calling multiple activity functions. But whenever there is some failure in activity functions or orchestration function the Runtime status of orchestration instance is showing as Running in azure functions Monitor Tab.

And I tried to manually call client.terminate(instance_id,"reason")

but not able to terminate the instance manually.

Please provide some solution to terminate the instance or fail the instance if there is any error encountered in the orchestration flow.

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

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,421 Reputation points
    2023-08-15T20:46:18.9133333+00:00

    Mallikarjuna NALLAGUNDLA Thanks for posting your question in Microsoft Q&A. Yes, you are correct that you need to call TerminateAsync in Durable Functions 2.x as described in Terminate instances doc (terminate in other languages). However, the instance will not move to Terminated state immediately rather the terminate operation will be queued and you can use instance query to know the status.

    If you observe that orchestration never ends and still in running state after a period of time, then it might be stuck, and we need to diagnose which requires investigation of backend logs of the durable function instance. I see a similar discussion related to history load failure, and possibly there could be other reasons as well. Sorry for the experience caused by this issue.

    So, I suggest you open a support ticket with azure support team, or feel free to submit a new issue via https://github.com/Azure/azure-functions-durable-extension/issues so that our product team can assist you further. If you don't have a support plan and would like to submit a ticket, let me know. I would be happy to assist you with that. I hope this helps and let me know if you have any questions.

    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.