Azure-Functions icon indicating copy to clipboard operation
Azure-Functions copied to clipboard

Azure Function Cosmos Trigger, Unable to handle partitions in parallel when there is retry

Open MhAllan opened this issue 2 years ago • 3 comments

Here is what I have

  • Cosmos Serverless account
  • Cosmos container partitioned by "id"
  • Azure function app hosted on slot of a Premium app
  • The function app is triggered by cosmos db change feed
  • The function app has Exponential Retry policy
 [ExponentialBackoffRetry(15, "00:15:00", "24:00:00")]
  • The function is .Net 6 app

Expected Behaviour

  • When the app fails for a given partition, it should stop handling that partition for 15 minutes first time (as per retry policy) but other partitions should get executed on time in parallel and should not wait the retry duration

Actual Behaviour

  • All partitions will wait the retry duration. The app doesn't handle cosmos db change feed in parallel nor it scales. When the function retries it retries the failed item and all other partitions changes keep in the queue, when that item fails, the function go into sleeping again ignoring all other partitions.

MhAllan avatar Mar 17 '22 08:03 MhAllan

Are you using Azure Function runtime V3 or V4?

Is the Azure Function running in-process (dotnet) or out-of-process (dotnet-isolated)?

jonas-stjernquist avatar Mar 18 '22 08:03 jonas-stjernquist

@devJ0n Azure Func V4, in-process

MhAllan avatar Mar 18 '22 08:03 MhAllan

Hi @mathewc / @alrod , Could you please look into this issue.

v-bbalaiagar avatar Mar 25 '22 02:03 v-bbalaiagar