Azure Function timeout after 5mins even though `functionTimeout` is set to `00:10:00` in `host.json`

Question:

I’m stumped here. I have an Azure Function with Python runtime, Consumption Plan, Timer Trigger.

Every time the Function runs it timesout at 5mins even though the host.json is set for 10mins.

host.json:

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

Error:

Exception type  Microsoft.Azure.WebJobs.Host.FunctionTimeoutException
Exception message   Timeout value of 00:05:00 was exceeded by function: Functions.daily_job

What am I missing here? Why is this occurring and how do I override it?


EDIT 1: functionTimeout is definitely set in Azure.

enter image description here

Yet it always throws a timeout error:

enter image description here

enter image description here


EDIT 2:

I had two host.json files, one in the project root (the correct one, but one I was not editing!), and one in the function directory (the incorrect one I was editing). I removed the incorrect one and edited the correct file and of course, the timeout is working as intended.

Asked By: SeaDude

||

Answers:

As @AnandSowmithiran Said, recheck or redeploy the Azure Function App in order to make host.json values deployed perfectly in Azure Portal Function App.

You have written the functionTimeout attribute value correctly in host.json and working successfully in the local environment.

And you have to check the same Values of host.json are published or not in the Azure Portal Function App by going to Azure portal > Your Function App > App Files:

enter image description here

As mentioned in the Scale limits of Azure Functions MS Doc, 10 minutes is the maximum time out for consumption plan which looks fine and same should be present in Azure Portal Function App as shown in the above.

Answered By: Pravallika KV
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.