简体   繁体   中英

Azure WebJob automatically gets aborted

I have aa 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 .

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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