小编ahm*_*yed的帖子

Azure网站上的"任务已取消"错误

随着我们Azure网站的流量增加,我们看到越来越多的"任务被取消"错误.典型的跟踪可能如下所示:

Fatal web api error: Controller: CustomerUserEventsController; 
Url: http://app.payboard.com/api/organizations/9ddf55d1-e0c1-4a8f-9327-eef38682e090/addcustomeruserevent?callback=jQuery210035782216349616647_1398442710964&cookieId=05be2755-dc0d-414d-b0d2-ea1986a929c3&customerId=&customerName=&customerUserId=&customerUserFirstName=&customerUserLastName=&eventName=hr-index-GET&_=1398442710965; 
Error: A task was canceled. ( at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext())
Run Code Online (Sandbox Code Playgroud)

我们过去常常每天得一个; 它一直在逐渐增加,所以现在我们得到了几十个.

您会注意到堆栈跟踪中只有框架代码 - 我们的代码根本就没有.所以我对如何解决它有点不知所措.关于如何跟踪这些问题的任何建议?

c# asynchronous azure async-await azure-web-sites

5
推荐指数
1
解决办法
3199
查看次数

标签 统计

async-await ×1

asynchronous ×1

azure ×1

azure-web-sites ×1

c# ×1