Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.94k stars 441 forks source link

Exponential Backoff Retries Inconsistent. #9892

Open Gamecock opened 8 months ago

Gamecock commented 8 months ago

Check for a solution in the Azure portal

When running a functionapp on a consumption plan, exponential backoff does not provide full number off retries.

Investigative information

Please provide the following:

Repro steps

Provide the steps required to reproduce the problem:

Deploy and run function with retry

Expected behavior

Initial Attempt and then 5 retires.

Actual behavior

Locally 1 Attempt and 4 Retries This could be considered design intent if everything worked this way and it was documented. Consumption 1 Attempts and 3 Retries image But sometimes 4 Retries image

AppService - Works as expected image ElasticPremium - Works as expected. image

Known workarounds

Increase Retries.

Related information

Provide any related information

        [Function("ExponentialBackoffSample")]
        [ExponentialBackoffRetry(5,"00:02:00", "1:00:00")]
        public void Run([TimerTrigger("0 40 */2 * * *")] MyInfo myTimer)
        {
            _logger.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}");
            _logger.LogInformation($"Next timer schedule at: {myTimer.ScheduleStatus.Next}");
            throw new Exception("Testing Backoff");
        }

-->

bhagyshricompany commented 8 months ago

Thanks for repro will check and update.

bhagyshricompany commented 8 months ago

seems your deployed function have issues for Exception encountered while listening to EventStream An existing connection was forcibly closed by the remote host. 2/29/2024 12:04:03 PM. you can refer this. https://learn.microsoft.com/en-us/answers/questions/965564/how-to-solve-an-existing-connection-was-forcibly-c

Gamecock commented 8 months ago

Thanks, where do you see the exception? Also, the article does not seem relevant, as of have limited to more control of the configuration of the socket connection.

On Fri, Mar 1, 2024, 2:14 AM bhagyshricompany @.***> wrote:

seems your deployed function have issues for Exception encountered while listening to EventStream An existing connection was forcibly closed by the remote host. 2/29/2024 12:04:03 PM. you can refer this.

https://learn.microsoft.com/en-us/answers/questions/965564/how-to-solve-an-existing-connection-was-forcibly-c

— Reply to this email directly, view it on GitHub https://github.com/Azure/azure-functions-host/issues/9892#issuecomment-1972632792, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMSCSQ5ADUKBVMYZRK27T3YWATDXAVCNFSM6AAAAABDVTTTI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZSGYZTENZZGI . You are receiving this because you authored the thread.Message ID: @.***>

bhagyshricompany commented 8 months ago

@fabiocav pls comment and validate.Thanks