简体   繁体   English

当Azure App Service停止时,Azure Webjob是否停止

[英]Does Azure Webjob stop when Azure App Service is stopped

In our current setup there are 2 slots for an Azure App service, the question that I have is, when the slot is stopped would it also shut down the webjob that is deployed on that slot or would the web job continue to run?在我们当前的设置中,有 2 个插槽用于 Azure 应用程序服务,我的问题是,当插槽停止时,它是否也会关闭部署在该插槽上的 Web 作业,或者 web 作业会继续运行吗?

It is possible to run an Azure WebJob even when the Azure App Service Web App is not running. 即使Azure App Service Web App未运行,也可以运行Azure WebJob。

Though you can force the WebJob not to run or stop when the Web App is running using WEBJOBS_STOPPED setting in your Web App's "Application Settings" 虽然在Web应用程序的“应用程序设置”中使用WEBJOBS_STOPPED设置运行Web App时,可以强制WebJob不运行或停止

Take a look at this article about this subject for more details: 有关更多详细信息,请查看有关此主题的文章:

https://blogs.msdn.microsoft.com/benjaminperkins/2017/03/01/failed-to-run-webjob/ https://blogs.msdn.microsoft.com/benjaminperkins/2017/03/01/failed-to-run-webjob/

The following picture shows a running WebJob when the web app is not running: 下图显示了Web应用程序未运行时正在运行的WebJob:

在此输入图像描述

https://github.com/projectkudu/kudu/wiki/Full-stopping-a-Web-App https://github.com/projectkudu/kudu/wiki/Full-stopping-a-Web-App

I have actually deleted some running jobs, but even though my jobs were shown as deleted in the UI, they are silently running and consuming the memory. I observed this from availability and Performance > Memory Analysis dashboard under Memory Drill Down > Memory Usage (App) > Physical Memory Usage section.我实际上已经删除了一些正在运行的作业,但即使我的作业在 UI 中显示为已删除,它们仍在静默运行并消耗 memory。我从可用性和性能 > Memory 下的分析仪表板观察到这一点Memory 向下钻取 > Memory 使用情况(应用程序) > Physical Memory 用法部分。 Shocked to see the jobs still running after they are deleted.震惊地看到作业被删除后仍在运行。 Luckily this solution helped me kill all the processes.幸运的是,这个解决方案帮助我终止了所有进程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM