microsoft / microsoft/durabletask-netherite

Regular HttpClient Timeouts experienced when running high volume

Open
#438 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2
Dominant language
C#
Stars
239
Forks
37
Avg merge
1d 10h
Merged PRs (30d)
2

Description

We have 5 isolated durable functions running within individual consumption plans (i.e. 1 slot, per plan), all with Netherite backends. At least once a day we typically experience a lot of the following TaskCanceledException:

Status(StatusCode="Cancelled", Detail="", DebugException="System.OperationCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.") The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing. The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing. The operation was canceled. The operation was canceled. 

App Insights will look like this:

Image

Each function is running Microsoft.Azure.Functions.Worker.Extensions.DurableTask.Netherite 2.1.0, has a max scale-out set to 5, and we have the following host.json configuration for each:

"durableTask": {
    "hubName": "<hub name>", // unique per function
    "useGracefulShutdown": "true",
    "storageProvider": {
      "type": "Netherite",
      "storageConnectionName": "AzureWebJobsStorage", // unique per function
      "eventHubsConnectionName": "EventHubConnectionString" // unique per function
    }
  }

Is this FASTER db crashing and taking a while to recover? A function restart will often address this issue and allow FASTER db to reinitialize with its task hub but if that doesn't happen for any reason, once the exceptions stop being thrown, the functions can often idle without picking up new work.

The functions themselves process reasonably high volumes (i.e. millions of messages/month) which is why we moved from Azure Table Storage to Netherite, but Netherite is proving to be more unreliable than Table Storage, as it stands.

Can this scenario be mitigated without upgrading to an EP plan? Will we see the same issue even if we upgrade?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the host.json durableTask and Netherite configuration described in the report, then inspect the App Insights traces for the 100-second HttpClient timeout and the behavior after a function restart. Done means identifying whether FASTER or the hosting plan causes the stalled work and documenting a supported mitigation, including whether an EP plan changes the outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.