skip to Main Content

I wonder why Azure Function retry mechanism taking more attempts than configured ("maxRetryCount": 2) and keep trying past the successful one, I have 2 attempts setup in host.json configuration, but I see more are taken for any failed document I checked, usually from 6 to 9. What even is less explainable I clearly see more attempts are done past the successful retry like one picture below (12:20:54), and I’m confident no exception raises in code in case of "Successfully uploaded document"

enter image description here

when I compare different log entries they are different on operation_Id, operation_ParentId and itemId, but same for the rest like appId

host.json

{
  ...
  "retry": {
    "strategy": "fixedDelay",
    "maxRetryCount": 2,
    "delayInterval": "00:00:30"
  }
}

2

Answers


  1. Chosen as BEST ANSWER

    I do not see this behavior anymore after couple of days since I introduced the retry mechanism settings. Looks like Azure 'adjusted' itself to work as expected, I did not change anything - code or configuration, not sure what it was, some kind of a glitch I guess.


  2. I am not sure if you have any other underlaying retry mechanism or not that could affect the Az Func retry policy. Here is a good explanation regarding Azure Functions error handling and retries.

    What I was thinking at the beginning of my answer was because of this:

    The function app retry policy is independent of any retries or resiliency that the trigger provides. The function retry policy will only layer on top of a trigger resilient retry. For example, if using Azure Service Bus, by default queues have a message delivery count of 10. The default delivery count means after 10 attempted deliveries of a queue message, Service Bus will dead-letter the message. You can define a retry policy for a function that has a Service Bus trigger, but the retries will layer on top of the Service Bus delivery attempts.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search