1

I have an continuous webjob that is supposed to run until I stop it. I rely on this condition, but for some reason this phenomena happens to me:

[01/19/2021 09:57:51 > 44ab83: SYS INFO] Detected WebJob file/s were updated, refreshing WebJob
[01/19/2021 09:57:51 > 44ab83: SYS INFO] Status changed to Stopping
[01/19/2021 09:57:56 > 44ab83: ERR ] Thread was being aborted.
[01/19/2021 09:57:57 > 44ab83: SYS INFO] WebJob process was aborted
[01/19/2021 09:57:57 > 44ab83: SYS INFO] Status changed to Stopped

The code didn't throw any error so I'm wondering why is the webjob restarting on its own. What does Detected WebJob file/s were updated, refreshing WebJob mean? I'm not creating/writing any files inside the WebJob's directory.

Garbem
  • 149
  • 1
  • 13

1 Answers1

2

Troubleshooting automatic restart/refresh of Azure Web Jobs

Solutions 1:

Reason 1:

Due to website shutdown/restart

Reason 2:

Due to changes in the azure web job directory files or file content (`D:\home\site\wwwroot\app_data\jobs\continuous\<WebJobName>`)

Reason 3:

Due to a web app and/or web job deployment

Reason 4:

Due to an azure outage or maintenance

For more details, you can refer to this blog.

Link: https://www.cryingcloud.com/blog/2016/11/02/troubleshooting-automatic-restart-of-azure-web-jobs

Solutions 2:

Raise a support ticket, let Microsoft help you check logs.

Jason Pan
  • 15,263
  • 1
  • 14
  • 29
  • What if you write to D:\local\Temp, should the WebJob restart? – Garbem Jan 20 '21 at 11:45
  • And moreover, is it possible to gracefully restart, implementing the same pattern as the graceful shutdown? – Garbem Jan 20 '21 at 11:51
  • According to your question, I can only help you analyze the cause of webjob restart. How to restart gracefully is another question. The suggestion is to raise a support ticket and consult the official product group for the response. – Jason Pan Jan 26 '21 at 02:10
  • If my solution inspires or helps you, please mark my answer as [accepted](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) , Tks~ – Jason Pan Jan 26 '21 at 02:10