Azure WebJob 超时配置设置 [英] Azure WebJob timeout configuration settings

查看:29
本文介绍了Azure WebJob 超时配置设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个 Azure 网站,其中包含每日计划作业.在我们的例子中,计划作业运行一个大约需要 10 分钟的存储过程,因此没有本地处理.我们的网络作业在大约 4 分钟后因此错误而终止.

We have an Azure web site with a daily scheduled job. In our case, the scheduled job runs a stored procedure that takes about 10 minutes so there is no local processing. Our web job is terminating after about 4 minutes with this error.

Command 'cmd /c ...' aborted due to no output and CPU activity for 121 seconds.
You may increase SCM_COMMAND_IDLE_TIMEOUT setting to solve the issue.

我们已尝试将以下应用设置添加到网络作业的 app.config 文件中:

We've tried adding the following app settings to the web job's app.config file:

<appSettings>
    <add key="SCM_COMMAND_IDLE_TIMEOUT" value="100000" />
    <add key="WEBJOBS_IDLE_TIMEOUT" value="100000" />
</appSettings>

本文档中引用了这些文件https://github.com/projectkudu/kudu/wiki/Web-工作,但它们似乎没有任何效果.(将设置添加到app.config文件后仍然超时)

Those files are referenced in this document https://github.com/projectkudu/kudu/wiki/Web-jobs but they don't seem to have any effect. (still timing out after adding the settings to the app.config file)

我们是否将配置设置添加到了正确的位置?

Are we adding the configuration settings to the right place?

感谢您的帮助.

推荐答案

您需要将门户中的 SCM_COMMAND_IDLE_TIMEOUT 设置为所需的超时值(以秒为单位).例如,将其设置为 3600 以表示一小时超时.

You need to set SCM_COMMAND_IDLE_TIMEOUT from the portal to your desired timeout value in seconds. For example, set it to 3600 for a one hour timeout.

转到您网站的配置部分,找到应用设置部分,然后添加设置.

Go to your website's config section, find the app settings section, and add the setting.

这篇关于Azure WebJob 超时配置设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆