创建订单时取消任务

时间:2017-07-01 23:46:54

标签: virtocommerce

创建新订单时,我看到执行时间过长,最后因TaskCanceledException而失败。

我使用自己的付款模块,并且已将其与已经写好的付款模块相比较,我似乎正在正确实施。付款正在处理中。

https://github.com/montanehamilton/vc-module-PayPal-Rest

我也有自定义送货方法模块

https://github.com/montanehamilton/vc-fedex

在遇到这种行为时,有什么想法在哪里看?运行2.13.9的平台。

异常详情

POST storefrontapi / cart / createorder 500内部服务器错误任务已取消。

System.Threading.Tasks.TaskCanceledException:任务已取消。  在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)  在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)  在System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(任务任务)  在VirtoCommerce.Storefront.AutoRestClients.OrdersModuleApi.OrderModule.d__9.MoveNext()  ---从抛出异常的先前位置开始的堆栈跟踪结束---  在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)  在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)  在VirtoCommerce.Storefront.AutoRestClients.OrdersModuleApi.OrderModuleExtensions.d__9.MoveNext()  ---从抛出异常的先前位置开始的堆栈跟踪结束---  在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)  在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)  在System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(任务任务)  在VirtoCommerce.Storefront.Controllers.Api.ApiCartController.d__21.MoveNext()  ---从抛出异常的先前位置开始的堆栈跟踪结束---  在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)  在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)  在System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)  在System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass37.b__36(IAsyncResult asyncResult)  在System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult 1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase 1.End()  在System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)  在System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d()  在System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters。<> c__DisplayClass46.b__3f()  在System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters。<> c__DisplayClass46.b__3f()  在System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters。<> c__DisplayClass46.b__3f()  在System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass33.b__32(IAsyncResult asyncResult)  在System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult 1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase 1.End()  在System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)  在System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass21。<> c__DisplayClass2b.b__1c()  在System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass21.b__1e(IAsyncResult asyncResult)

2 个答案:

答案 0 :(得分:1)

由于超时,任务被取消。应将VirtoCommerce店面配置为将这些超时设置为适合该任务的值。

在我的情况下,PayPal建议至少30秒,如果不是更多。我将超时设置为1分钟,问题已解决。

您可以在web.config中设置名称为“VirtoCommerce:Storefront:ApiRequest:Timeout”的AppSetting,以在进行API调用时更改超时。

答案 1 :(得分:0)

我建议更新平台到2.13.11,模块到最新版本。

此更新减少了订单流程中的内存使用情况和性能,因此我们可以降低Azure价格计划。

相关问题