This function calcs prime numbers, the count of numbers passed in 'calc' parameter
When I run it like https://functionapp20180120115220.azurewebsites.net/api/Calc1?calc=30000
in ~2 mins I got
502 Bad Gateway.
The specified CGI application encountered an error and the server terminated the process.
ARRAffinity
c9b88f86b83de50e291e31118f8f5e1ba964de7beca6a03b0130da4ad18abbe4
functionapp20180120115220.azurewebsites.net
/
true
When I go to the portal I see that function still is running and eventually it succeeded in ~150 sec.
Function MUST not return 502 error in 2 minutes.
I tried the same code for 1.0 runtime and it works and I didn't see 502 error for such period of time.
I run requests several times and using different tools.
Sorry if this wasn't made clear. + @tdykstra who might be able to confirm what our docs say.
For HTTP Functions, they must complete within ~2 minutes or our gateway will timeout. It's recommended you follow async patterns with HTTP and return a location where they can ping the status of that request.
For non-HTTP Functions, they can go up to 10 minutes.
This is as designed.
We have minimal v2 info in our docs right now, but we recently added a Limits section in the HTTP/Webhook binding ref doc that seems like an appropriate place to add a note like this.
@christopheranderson please see https://github.com/MicrosoftDocs/azure-docs-pr/pull/31958 - I added this note without flagging it as v2 only.
@christopheranderson, @tdykstra thanks for clarification, however still have questions:
@Alezis The note will go here. It has to go through review first, so it may be a few days before it shows up in the doc.
Most helpful comment
@christopheranderson, @tdykstra thanks for clarification, however still have questions:
thanks,