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

查看:153
本文介绍了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天全站免登陆