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"
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
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.
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: