Continuous WebJob randomly restarts

Ihor Dyrman 181 Reputation points
2021-02-09T09:13:52.897+00:00

I run a continuous WebJob in my WebApp. What I have found is that it can randomly restart.
I've checked my web app settings and "Always On" is turned on. I have no triggers that can cause a reboot.
This is an empty web app, creating from scratch. All I have done is just published my continuous WebJob.
How can I prevent this random reboots?

As I see from App Insight it restarts after 10 minutes from the first run

2/9/2021, 12:46:45 PM - TRACE
Checking for active containers
Severity level: Information

2/9/2021, 12:46:45 PM - TRACE
Job host started
Severity level: Information

2/9/2021, 12:46:45 PM - TRACE
No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
Severity level: Warning

2/9/2021, 12:46:45 PM - TRACE
Starting JobHost
Severity level: Information


2/9/2021, 12:36:44 PM - TRACE
2: Change Feed Processor: Processor_Container2 with Instance name: 4b94336ff47c4678b9cf4083a60f0b3bf1cd9f77ce7d501100a9d4e60bd87e8e has been started
Severity level: Information

2/9/2021, 12:36:37 PM - TRACE
1: Change Feed Processor: Processor_Container1 with Instance name: 4b94336ff47c4678b9cf4083a60f0b3bf1cd9f77ce7d501100a9d4e60bd87e8e has been started
Severity level: Information

2/9/2021, 12:36:32 PM - TRACE
Checking for active containers
Severity level: Information

2/9/2021, 12:36:32 PM - TRACE
Job host started
Severity level: Information
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,997 questions
0 comments No comments
{count} votes

Accepted answer
  1. ajkuma 27,256 Reputation points Microsoft Employee
    2021-02-10T09:56:45.453+00:00

    @Ihor Dyrman , Kindly review the Jobs and logs to isolate the issue further:

    For continuous WebJobs - Console.Out and Console.Error are routed to the "application logs", they will show up as file or blob depends on your configuration of the application logs (similar to your WebApp).

    Kindly check this document for more details - https://github.com/projectkudu/kudu/wiki/WebJobs#logging

    I have seen cases, where having unnecessary app settings on the configuration blade of WebJobs on the portal caused reboots.
    Kindly identify and remove unnecessary app settings as required (as a test).

    Also, kindly see if this setting is present ‘WEBJOBS_RESTART_TIME ‘-Timeout in seconds between when a continuous job's process goes down (for any reason) and the time we re-launch it again (Only for continuous jobs).

    Could you please share more information of your WebJob and Webapp? What App Service Plan are you using?
    P.S. Kindly do not share any PII data on the public forum.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.