Azure Webjob 无故停止

问题描述

我有一个连续的 webjob,它应该一直运行,直到我停止它。我依赖这个条件,但由于某种原因,这种现象发生在我身上:

[01/19/2021 09:57:51 > 44ab83: SYS INFO] Detected WebJob file/s were updated,refreshing WebJob
[01/19/2021 09:57:51 > 44ab83: SYS INFO] Status changed to Stopping
[01/19/2021 09:57:56 > 44ab83: ERR ] Thread was being aborted.
[01/19/2021 09:57:57 > 44ab83: SYS INFO] WebJob process was aborted
[01/19/2021 09:57:57 > 44ab83: SYS INFO] Status changed to Stopped

代码没有抛出任何错误,所以我想知道为什么 webjob 自己重新启动。 Detected WebJob file/s were updated,refreshing WebJob 是什么意思? 我没有在 WebJob 的目录中创建/写入任何文件

解决方法

Azure Web 作业的自动重启/刷新疑难解答

解决方案 1:

原因 1:

Due to website shutdown/restart

原因 2:

Due to changes in the azure web job directory files or file content (`D:\home\site\wwwroot\app_data\jobs\continuous\<WebJobName>`)

原因 3:

Due to a web app and/or web job deployment

原因 4:

Due to an azure outage or maintenance

更多细节可以参考这篇博客。

链接:https://www.cryingcloud.com/blog/2016/11/02/troubleshooting-automatic-restart-of-azure-web-jobs

解决方案 2:

提出支持请求,让 Microsoft 帮助您检查日志。