1

I have a triggerd web job which is a console application. I deployed it by zipping the Debug folder of Console App. My Job has to run till it finished. I don't see any error and after 1 or 2 hours it get aborted. I put SCM_COMMAND_IDLE_TIMEOUT as 36000 in App Setting of App Service and this is Slot Setting. It is still aborting.. I searched here and found that we need Console.Write for web jobs. I have logging in my WebJob which logs using both System.Trace.TraceInformation and Console.Write as well. Still it aborts.

could anyone please help me why my job is still Aborting.

user2584780
  • 37
  • 1
  • 6
  • Please, could you share your code Program.cs and Function.cs ? – José Quinto Zamora Feb 18 '17 at 11:02
  • Share us your site name or indirectly (https://github.com/projectkudu/kudu/wiki/Reporting-your-site-name-without-posting-it-publicly) and the time of abort + timezone. We can help figure it out. – Suwat Ch Feb 18 '17 at 18:49

2 Answers2

3

I'd suggest going into your Web App that is hosting your WebJob and add an entry for WEBJOBS_IDLE_TIMEOUT (not SCM_COMMAND_IDLE_TIMEOUT) under the Application Settings blade's App settings section. This is the time, in seconds, until Kudu will kill a WebJob that hasn't had any requests or output in the given time period. Set it to something obscenely high. It only applies to triggered WebJobs. You can read the docs about it here.

Rob Reagan
  • 7,313
  • 3
  • 20
  • 49
2

If Always on is not turn on on the Azure Portal, please trun on it. More detail info, please refer to another SO thread. We also could get more info about WebJob and WebApp appsetting from the official document.

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.

Community
  • 1
  • 1
Tom Sun - MSFT
  • 24,161
  • 3
  • 30
  • 47