سؤال

What does "Pending Restart" mean? I have stopped and restarted my WebJob numerous times and that doesn't seem to fix it. Does it mean I have to restart my website? What caused my job to get in this state in the first place? Is there any way I can prevent this from happening in the future?

هل كانت مفيدة؟

المحلول

Usually, it means that the job fails to start (an exception?). Look in the jobs dashboard for logs.

Also, make sure that if the job is continuous, you actually have an infinite loop that keeps the process alive.

نصائح أخرى

To add to Victor's answer, the continuous WebJob states are:

  • Initializing - The site was just started and the WebJob is doing it's initialization process.
  • Starting - The WebJob is starting up the process/script.
  • Running - The WebJob's process is running.
  • PendingRestart - The WebJob's process exited (for any good or bad reason) in less than 2 minutes since it started, for a continuous WebJob it's considered that something was probably not right with it (some exception during start-up probably as mentioned by Victor), at this point the system is waiting for 60 seconds before it'll restart the WebJob process (hence the name "pending restart").
  • Stopped - The WebJob was stopped (usually from the Azure portal) and is currently not running and will not be running until it is started again, best way to see this is as disabled.

Also, take a look at the webjob log, it should hold cue to what's been happening.

if the JOB is set to run continuously, once the process exits (say you are polling a queue and it's empty) the job shuts down and status changes to "pending restart". Azure Scheduler will typically restart the process in 60 seconds.

Try changing the target framework to .NET 4.5. This same issue was fixed for me when I changed the target framework from 4.6.1 to 4.5.

Had the same problem, found out that i need to keep my webjob alive, so I put a continous loop to keep it alive.

It means that application is failing after start. Check the App Service Application setting might have some problem. .. In my case i am passing date as a configuration and i entered wrong date like 20160431

This is just because Webjobs is failing or giving exception. Make sure the Webjobs is continuous and you can check that in the log where it failing and can make the changes.

Process went down, waiting for 60 seconds Status changed to Pending Restart

In my case, we got the deployment package prepared through the Visual Studio folder publish and deployed along with WebApp. Package created through 'Folder publish' lacked 'run.cmd' file in which command to invoke the console application (.exe) is available; this file is automatically created when we directly publish to Azure WebJob from Visual Studio.

After manually adding this to a package folder, the issue got fixed.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top