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
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