gpt4 book ai didi

消费计划的 Azure Functions 超时

转载 作者:行者123 更新时间:2023-12-03 12:10:36 25 4
gpt4 key购买 nike

是否可以更改在消耗计划下运行的 Azure Functions 当前 5 分钟超时限制?

对于某些数据分析计算,5 分钟是不够的。

使用 webjobs 的替代方案不允许并行执行该函数。

最佳答案

(其他答案有点令人困惑,所以编写而不是大量编辑)

通过将 functionTimeout 设置添加到 host.json 文件中,Azure Functions 现在可以使用消耗计划运行长达 10 分钟:

In a serverless Consumption plan, the valid range is from 1 second to 10 minutes, and the default value is 5 minutes.

In both Premium and Dedicated (App Service) plans, there is no overall limit, and the default value is 30 minutes. A value of -1 indicates unbounded execution, but keeping a fixed upper bound is recommended

来源:https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout

文件:host.json

// Value indicating the timeout duration for all functions.
// Set functionTimeout to 10 minutes
{
"functionTimeout": "00:10:00"
}

来源:
https://buildazure.com/2017/08/17/azure-functions-extend-execution-timeout-past-5-minutes/
https://github.com/Azure/azure-webjobs-sdk-script/wiki/host.json

关于消费计划的 Azure Functions 超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42358151/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com