Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Function Proxy - Cold Startup - Error 429 Too many requests

I've set up a function app in Azure. I've added a proxy to the function (so I can assign it a different URI).

When the proxy and function have been torn down and its time to wake it up, I sometimes get the error code 429: Too many requests from a single Postman/insomnia request to wake it up.

How do I stop this from happening?

For the time being, I've added a logic app to ping it every 5 mins.

like image 885
Sebastian Patten Avatar asked Dec 22 '22 16:12

Sebastian Patten


2 Answers

Seems to be something with the last release of https://github.com/Azure/azure-functions-host/releases/tag/v3.0.15185 On the date of this release we started receiving 429s, a lot, on the functions we had running for a long time.

We fixed it by adding the following to the hosts.json:

  "extensions": {
    "http": {
      "dynamicThrottlesEnabled": false
    }
  }

Doc: https://learn.microsoft.com/pt-br/azure/azure-functions/functions-bindings-http-webhook-output

My guess is that they've changed some default values.

EDIT: We are operating for a long time using BOTH, the hosts.json update from above and the pinned version, stated by sanjo (https://stackoverflow.com/a/65311645/10585914).

You can follow the entire discussion here: https://github.com/Azure/azure-functions-host/issues/6984

And the PR: https://github.com/Azure/azure-functions-host/pull/6986

like image 133
Cassio Ferreira Avatar answered Mar 07 '23 07:03

Cassio Ferreira


We are also experiencing 429's in our azure-function and has been advised by MS to force the Azure Functions Extensions to a lower version by setting FUNCTIONS_EXTENSION_VERSION to 3.0.14916.0 instead of ~3

We're still evaluating the "solution".

like image 30
Sanjo Avatar answered Mar 07 '23 09:03

Sanjo