Azure WebJob显示“Never finished”状态及单例/调度失效求助
Azure App Service WebJob: Long-running Tasks Show "Never Finished", Singleton & Schedule Rules Failing
I'm running a long-running WebJob (expected to take around 1 hour) on Azure App Service, with the Always on feature enabled. Here's my initialization code:
var host = new JobHost(config); host.Call(typeof(Functions).GetMethod("SyncUsers")); host.Start();
The SyncUsers method has these attributes applied:
[Timeout("00:59:00", ThrowOnTimeout = true)] [NoAutomaticTrigger]
I've set up the scheduling rules via a settings.job file:
{ "is_singleton": true, "schedule": "0 0 */4 * * *" }
Core Issues:
- 90% of the tasks show a "Never finished" status in the WebJobs Dashboard (a few failures due to exceptions are expected). The tasks run for anywhere from 5 to 30 minutes before abruptly stopping, with no exceptions or detailed info in the logs.
- The singleton and schedule rules seem to be failing: multiple tasks are running in parallel, even though they should only execute once every 4 hours.
- Some of these "Never finished" tasks don't show a runtime duration, and their logs can't be viewed or downloaded.
Has anyone encountered similar issues? Any insights or solutions would be greatly appreciated!
内容的提问来源于stack exchange,提问作者Mykhail Galushko
相关产品推荐
相关产品推荐

