长 运行 触发的 WebJob 也被 Azure 中止,设置也为 SCM_COMMAND_IDLE_TIMEOUT
Long running Triggered WebJob Aborted by Azure with SCM_COMMAND_IDLE_TIMEOUT setting too
我有一个触发式 Web 作业,它是一个控制台应用程序。我通过压缩控制台应用程序的调试文件夹来部署它。我的工作必须 运行 直到完成。我没有看到任何错误,并且在 1 或 2 小时后它被中止了。我在App Service的App Setting中把SCM_COMMAND_IDLE_TIMEOUT设置为36000,这是Slot Setting。它仍在中止..我在这里搜索并发现我们需要 Console.Write 用于网络作业。我已经登录了我的 WebJob,它也使用 System.Trace.TraceInformation 和 Console.Write 进行登录。它仍然中止。
谁能帮我解释为什么我的工作仍在中止。
我建议进入托管 WebJob 的 Web 应用程序,并在“应用程序设置”边栏选项卡的“应用程序设置”部分下为 WEBJOBS_IDLE_TIMEOUT(而不是 SCM_COMMAND_IDLE_TIMEOUT)添加一个条目。这是 Kudu 杀死在给定时间段内没有任何请求或输出的 WebJob 之前的时间(以秒为单位)。将它设置为高得离谱的东西。它仅适用于触发的 WebJobs。您可以阅读有关它的文档 here。
如果 Always on 未在 Azure 门户上打开,请打开它。更多详细信息,请参考官方文档中的另一个. We also could get more info about WebJob and WebApp appsetting。
If we don’t turn it Always On, WebJob may abort in idle for some period of time. Web apps are unloaded if they are idle for some period of time. This lets the system conserve resources. Please have a try to set Always On to keep the app loaded all the time.
我有一个触发式 Web 作业,它是一个控制台应用程序。我通过压缩控制台应用程序的调试文件夹来部署它。我的工作必须 运行 直到完成。我没有看到任何错误,并且在 1 或 2 小时后它被中止了。我在App Service的App Setting中把SCM_COMMAND_IDLE_TIMEOUT设置为36000,这是Slot Setting。它仍在中止..我在这里搜索并发现我们需要 Console.Write 用于网络作业。我已经登录了我的 WebJob,它也使用 System.Trace.TraceInformation 和 Console.Write 进行登录。它仍然中止。
谁能帮我解释为什么我的工作仍在中止。
我建议进入托管 WebJob 的 Web 应用程序,并在“应用程序设置”边栏选项卡的“应用程序设置”部分下为 WEBJOBS_IDLE_TIMEOUT(而不是 SCM_COMMAND_IDLE_TIMEOUT)添加一个条目。这是 Kudu 杀死在给定时间段内没有任何请求或输出的 WebJob 之前的时间(以秒为单位)。将它设置为高得离谱的东西。它仅适用于触发的 WebJobs。您可以阅读有关它的文档 here。
如果 Always on 未在 Azure 门户上打开,请打开它。更多详细信息,请参考官方文档中的另一个
If we don’t turn it Always On, WebJob may abort in idle for some period of time. Web apps are unloaded if they are idle for some period of time. This lets the system conserve resources. Please have a try to set Always On to keep the app loaded all the time.