3
votes

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# ?

1
Could this be related to your web job running on the free tier, and your app pool being recycled?David Makogon
no its not a free tier, the web app is always ondolcetheking

1 Answers

5
votes

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.

enter image description here

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.

enter image description here