英文:
Azure Function timeout after 5mins even though `functionTimeout` is set to `00:10:00` in `host.json`
问题
I'm stumped here. I have an Azure Function with Python runtime, Consumption Plan, Timer Trigger.
Every time the Function runs it times out at 5 minutes even though the host.json
is set for 10 minutes.
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.
Yet it always throws a timeout error:
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.
英文:
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.
Yet it always throws a timeout error:
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.
答案1
得分: 1
如@AnandSowmithiran所说,重新检查或重新部署Azure函数应用程序,以确保host.json
中的值在Azure Portal函数应用程序中完美部署。
您已正确写入host.json
中的**functionTimeout
**属性值,并在本地环境中成功运行。
您需要检查host.json
中的相同值是否已发布到Azure Portal函数应用程序,方法是转到Azure门户 > 您的函数应用 > 应用程序文件:
正如在Azure Functions的规模限制MS Doc中所提到的,消耗计划的最大超时时间为10分钟,这看起来是正确的,并且在Azure Portal函数应用程序中也应该如上所示。
英文:
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:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论