Does Azure Webjob stop when Azure App Service is stopped
Asked Answered
S

2

16

In our current setup there are 2 slots for an Azure App service, the question that I have is, when the slot is stopped would it also shut down the webjob that is deployed on that slot or would the web job continue to run?

Slavey answered 17/3, 2017 at 20:29 Comment(0)
D
13

It is possible to run an Azure WebJob even when the Azure App Service Web App is not running.

Though you can force the WebJob not to run or stop when the Web App is running using WEBJOBS_STOPPED setting in your Web App's "Application Settings"

Take a look at this article about this subject for more details:

https://blogs.msdn.microsoft.com/benjaminperkins/2017/03/01/failed-to-run-webjob/

The following picture shows a running WebJob when the web app is not running:

enter image description here

Doublure answered 17/3, 2017 at 20:36 Comment(3)
See also github.com/projectkudu/kudu/wiki/Full-stopping-a-Web-AppWaler
It might be possible to run an Azure WebJob even when the Azure App Service Web App is not running, but, does the Azure Webjob actually stop when the Azure App Service is stopped?Airdry
@DavidEbbo your solution worked for Me. I have actually deleted some running jobs, but even though my jobs were shown as deleted in the UI, they are silently running and consuming the memory. I observed this from availability and Performance > Memory Analysis dashboard under Memory Drill Down > Memory Usage (App) > Physical Memory Usage section. Shocked to see the jobs still running after they are deleted. Luckily your solution helped me kill all the processes. Thanks a lot.Spearwort
S
0

https://github.com/projectkudu/kudu/wiki/Full-stopping-a-Web-App

I have actually deleted some running jobs, but even though my jobs were shown as deleted in the UI, they are silently running and consuming the memory. I observed this from availability and Performance > Memory Analysis dashboard under Memory Drill Down > Memory Usage (App) > Physical Memory Usage section. Shocked to see the jobs still running after they are deleted. Luckily this solution helped me kill all the processes.

Spearwort answered 11/10, 2021 at 15:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.