プレミアム層のWebアプリケーション(App Service)でWebジョブを実行しています。応答を返すのに時間がかかるREST APIエンドポイントを呼び出します。 Webジョブは20分後に中断されていますが、ドキュメンテーションによると、Webジョブはバックグラウンドで長時間実行されるタスクを実行できます。それは期待どおりに動作していないようです。Webjobを連続して実行しているのが20分後に中止します。
Webジョブ機能に指定できる最大タイムアウトはありますか。
コード:
public async Task<HttpResponseMessage> GetAsync(Uri requestUrl)
{
_httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", GetAadAuthentication().AccessToken);
var httpResponse = await _httpClient.GetAsync(requestUrl);
if (!httpResponse.IsSuccessStatusCode)
{
ProcessFailedRequest(httpResponse);
}
return httpResponse;
}
例外ログ:
[05/26/2017 21:28:01 > 6e349c: ERR ] Unhandled Exception: System.Threading.Tasks.TaskCanceledException: A task was canceled.
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/26/2017 21:28:01 > 6e349c: ERR ] at Util.testWebClient.<GetAsync>d__12.MoveNext() in d:\test\Util\testWebClient.cs:line 99
[05/26/2017 21:28:01 > 6e349c: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/26/2017 21:28:01 > 6e349c: ERR ] at Util.testClient.<GetForecastResultAsync>d__7.MoveNext() in d:\test\Util\testClient.cs:line 135
[05/26/2017 21:28:01 > 6e349c: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/26/2017 21:28:01 > 6e349c: ERR ] at AutoAggregation.Functions.<>c__DisplayClass18_0.<ProcessResultDownloadMessage>b__0(Object workItem) in d:\test\AutoAggregation\Functions.cs:line 198
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Threading.ThreadPoolWorkQueue.Dispatch()
[05/26/2017 21:28:01 > 6e349c: ERR ] at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
に設定した
。この20分のタイムアウトは、プレミアム層のWebジョブにも適用されますか? –
より高いプランでは、この制限を取り除く 'Always On'を有効にすることができます –