Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orchestration stops on Await status after the first activity #2869

Closed
sibircevs opened this issue Jul 3, 2024 Discussed in #2868 · 2 comments
Closed

Orchestration stops on Await status after the first activity #2869

sibircevs opened this issue Jul 3, 2024 Discussed in #2868 · 2 comments

Comments

@sibircevs
Copy link

Discussed in #2868

Originally posted by sibircevs July 2, 2024
Hello,

Orchestration stops on Await status after the first activity. There is no error or something interesting in the logs.
image

There is nothing special in the source too.

const df = require("durable-functions");

module.exports = df.orchestrator(function* (context) {
    const taxId = process.env.TAX_ID;

    const getIndexRateResponse = yield context.df.callActivity("getIndexRate", taxId);
    if (getIndexRateResponse[0]) {
        context.log.error(`Process is terminated. 'getIndexRate' returns error -> ${getIndexRateResponse[0]}`);
        return;
    }
    const taxData = getIndexRateResponse[1];

    const filterCriteria = [
        {
            "field": "accountState",
            "operator": "EQUALS",
            "value": "MATURED"
        },
        {
            "field": "balances.availableBalance",
            "operator": "MORE_THAN",
            "value": 0
        }
    ];
    const getTermDepositsListResponse = yield context.df.callActivity("getTermDepositsList", filterCriteria);
    if (getTermDepositsListResponse[0]) {
        context.log.error(`Process is terminated. 'getTermDepositsList' returns error -> ${getTermDepositsListResponse[0]}`);
        return;
    }

...
}

I defined "Information" for df framework logging:
"DurableTask.AzureStorage": "Information",
"DurableTask.Core": "Information"

It is the result:

Fetched instance status for 0866137833df4d8295ebc8d6cf3ecfea
0866137833df4d8295ebc8d6cf3ecfea: Updated Instances table and set the runtime status to 'Pending'
0866137833df4d8295ebc8d6cf3ecfea: Fetched [ExecutionStarted] message from funcXXX-control-02 (delay = 1018ms)
Fetched instance status for 0866137833df4d8295ebc8d6cf3ecfea
0866137833df4d8295ebc8d6cf3ecfea: No history events were found
0866137833df4d8295ebc8d6cf3ecfea: Processing [ExecutionStarted] (total delay = 1842ms)
0866137833df4d8295ebc8d6cf3ecfea: Executing 'dfoDepositWithdraw' orchestration logic
0866137833df4d8295ebc8d6cf3ecfea: Orchestration 'dfoDepositWithdraw' awaited and scheduled 1 durable operation(s).
0866137833df4d8295ebc8d6cf3ecfea: Scheduling activity [getIndexRate#0] with 0 bytes of input
0866137833df4d8295ebc8d6cf3ecfea: Sending [TaskScheduled#0] message to funcXXX-workitems for instance '0866137833df4d8295ebc8d6cf3ecfea'
0866137833df4d8295ebc8d6cf3ecfea: Fetched [TaskScheduled#0] message from funcXXX-workitems (delay = 410ms)
0866137833df4d8295ebc8d6cf3ecfea: Processing [TaskScheduled#0] (total delay = 411ms)
0866137833df4d8295ebc8d6cf3ecfea: Starting task activity [getIndexRate#0]
0866137833df4d8295ebc8d6cf3ecfea: Starting task activity [getIndexRate#0]
0866137833df4d8295ebc8d6cf3ecfea: Appended 4 new events to the history table in 0ms
0866137833df4d8295ebc8d6cf3ecfea: Updated Instances table and set the runtime status to 'Running'
0866137833df4d8295ebc8d6cf3ecfea: Deleting [ExecutionStarted] message from funcXXX-control-02
0866137833df4d8295ebc8d6cf3ecfea: Task activity [getIndexRate#0] completed successfully
0866137833df4d8295ebc8d6cf3ecfea: Deleting [TaskCompleted#0] message from funcXXX-control-02

Trace logs didn't help too.

BR,
Andrejs Sibircevs

@sibircevs
Copy link
Author

sibircevs commented Jul 3, 2024

I am not sure but now, it looks like the problem is solved by changing the parameter extendedSessionsEnabled from true to false in the host.json file.
"extensions": {
"durableTask": {
"extendedSessionsEnabled": false,

@andystaples
Copy link
Contributor

Hi @sibircevs,
Extended sessions is not supported in any language besides .NET inprocess. We agree that this scenario should fail more intelligently - see this draft PR and it's conversation for more details
#2732

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants