Long running Web Job being aborted by Azure

余生长醉 提交于 2019-11-29 01:30:15

问题


I have a Web Job within an Azure website that is being aborted. Its rather long running, taking perhaps 30 mins. It pulls in a lot of data from an Azure SQL database and basically compiles figures used for reporting.

Looking at the output logs it would appear that Azure aborts the job with no warning mid way through execution. There is no indication as to why.

Is there a way to prevent Azure from aborting a Web Job?

The website is hosted within a standard azure website.

Thanks


回答1:


Check the stopping_wait_time parameter within webjob-publish-settings.json. The value of the parameter is used in seconds. So if you need 30 minutes of execution time before azure aborts it use:

"stopping_wait_time": 1800

Credits here: http://blog.amitapple.com/post/2014/05/webjobs-graceful-shutdown/#.VNqThvmG8oc

regards



来源:https://stackoverflow.com/questions/27939766/long-running-web-job-being-aborted-by-azure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!