Azure WebJob自动中止

编程入门 行业动态 更新时间:2024-10-21 06:17:51
本文介绍了Azure WebJob自动中止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个用.NET C#开发的WebJob项目,我通过Visual Studio 2015在Azure上部署了该WebJob.CRON "0 0 7 1 * *" "[[11/02/2016 20:29:52> 21cce2:INFO]更新单例锁....."

所以一切看起来都不错,但是几个小时后,Webjob会在Azure门户上自动中止,而无需对Web应用程序或Webjob本身进行任何更改.

可能是什么原因,如何使用C#避免这种情况?

解决方案

网络应用始终处于打开状态.

这是否意味着在Azure门户中已打开始终在线?默认情况下,它是关闭的.如果我们不始终打开将其打开,则WebJob可能会在闲置一段时间后中止运行.如果Web应用程序闲置了一段时间,则将其卸载.这样可以节省系统资源.请尝试设置始终开启"以始终保持应用程序加载.更多,请参阅屏幕截图.

如果打开始终在线,并且始终使WebJob中止,请尝试安装崩溃诊断程序"以捕获崩溃的信息.有关崩溃诊断程序的更多信息,请参考

I have a a WebJob project developed in .NET C#, which I deploy on Azure through Visual Studio 2015. The WebJob is scheduled with CRON "0 0 7 1 * *" (to run at 1st day of the every month at 7am) on the settings.job file. After it is deployed and running, on the log keep getting the singleton lock message every 30 seconds:

"[11/02/2016 20:29:52 > 21cce2: INFO] Renewing Singleton lock....."

So everything looks good, but after couple of hours the webjob gets automatically aborted on Azure Portal, without doing any changes to the web app or the webjob itself.

What can be the reason and how can I avoid this with C# ?

解决方案

the web app is always on.

Does it mean that Always On is turned on in Azure Portal? By default, it is turned off. 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. More please refer to the screenshot.

If the Always On is turned on, and always get the WebJob aborted ,please have a try to install Crash Diagnoser to catch crashed info. More info about Crash Diagnoser,please refer to link.

更多推荐

Azure WebJob自动中止

本文发布于:2023-11-14 04:27:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1586219.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Azure   WebJob

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!