Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Functions Timeout more than 10 Minutes doesn't work in App Service Plan #1053

Open
pmadusud opened this issue Dec 2, 2018 · 9 comments

Comments

@pmadusud
Copy link

pmadusud commented Dec 2, 2018

I have a scenario in which one of the functions which I am trying to consume might not return the result for more 10 minutes (depending on the response data). As I am not able to use the Consumption plan due to this, I tried using the App Service Plan with Basic tier (both B1 & B2). However, the function still errors out due to Timeout issue.

500 - The request timed out

Any pointers to solve this issue will be greatly appreciated.

Thanks

@alrod
Copy link
Member

alrod commented Dec 4, 2018

Did you specify functionTimeout in host.json?

@pmadusud
Copy link
Author

pmadusud commented Dec 4, 2018

Host.json is specified as below...

{
"version": "2.0",
"functionTimeout": "00:30:00"
}

Also, I have ensured that the Always On is turned on as well. However, as mentioned, these values doesn't seem to have any effect with the App Service plan as the function timeout after around 4 minutes.

@jrgcubano
Copy link

Same problem here. App service plan (premium v2) with azure function v1.

@JohnReeson
Copy link

There's a 230-second timeout setting for requests that are not sending any data back, check this thread. We could put the longtime job in a queue trigger function or have a try at Durable Function.

@pmadusud
Copy link
Author

@JohnReeson Thanks. However, as per the documents Azure functions timeout can be extended more than 10 mins using the App Service plan (Consumption plan has a limit of max 10 mins timeout). Please check the docs here...

The issue is the App Service plan timeout doesn't work as mentioned in the docs, not sure what I am missing.

Also, using the Durable functions will not automatically solve the issue as typically the durable functions is composed of other azure functions as in my case. In my scenario, one of the azure functions takes more than 10 mins to return the results. So, getting the Azure Functions timeout more than 10 mins to work is very important otherwise I am forced not to use Azure Functions for my solution.

@JohnReeson
Copy link

@pmadusud You are right about that Function can execute more than 10m on App service plan. But for Http trigger, an http request requires a response in 230s or we get 500 time out, which is more than an Azure Function limitation. The workaround is that we send http request to the http trigger, where we start another trigger(non-http trigger) to process long-time job and send response immediately.

@ColbyTresness
Copy link

@eamonoreilly

@edmlbox
Copy link

edmlbox commented Jan 23, 2021

Sam problem

@ayushjain1035
Copy link

Try using Orchestration trigger for such problems. It is designed for long running processes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants