[步骤]
[12:38:00] -------------------------------------------------------------
CODE:N1238006
Error:11_-2_0_-2146232060
SQL:
UPDATE
oi
SET oi.PayAmountAmount = oe.PayAmount,
oi.UpdateTime = GETDATE()
FROM RB_AliExpress_OrderInfo oi (NOLOCK), RB_AliExpress_OrderExpand oe (NOLOCK)
WHERE oi.AliExpressOrderID IN (SELECT ITEM FROM Charsplitforin(@ClientOrderCodes, ','))
AND oi.OrderSourceID = @OrderSourceID
AND oi.CustomerID = @CustomerID
AND oi.AliExpressOrderID = oe.ClientOrderCode
AND oi.OrderSourceID = oe.OrderSourceID
AND oi.CustomerID = oe.CustomerID
PARAMS:@ClientOrderCodes = 8185119524016503,1103561468046844 ,@OrderSourceID = 6252 ,@CustomerID = 1 ,
MESSAGE:执行超时已过期。完成操作之前已超时或服务器未响应。
The statement has been terminated.
TRACE: 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
在 RB.DAL.DBOperator.ExecuteSql(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms) 在 RB.DAL.DBOperator.toCommonTipException(SqlException ex, String sql, SqlParameter[] cmdParms)
在 RB.DAL.DBOperator.ExecuteSql(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms)
在 RB.DALExtend.Generate.RB_AliExpress_OrderInfoExtend.UpdateAliexpressOrderPayAmount(List`1 clientOrderCodes, Int32 orderSourceId, Int32 customerId)
在 Biz.AliExpress.AliExpressV3OrderDownload.OrderDownloadByAPI(OrderAPIModel parameters)
在 Biz.PlatformUtil.AOrderDownload.DoOrderDownloadTask(IOrderDownloadUtil parameters)
在 System.Threading.Tasks.Task.Execute()
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
在 System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
在 System.Threading.ThreadPoolWorkQueue.Dispatch()
同样处理
[00:36:28] -------------------------------------------------------------
CODE:N0036281
Error:11_-2_0_-2146232060
SQL:
UPDATE
oi
SET oi.PromotionDiscountAmount = ((CASE WHEN eoi.InitOderAmountAmount > 0 THEN eoi.InitOderAmountAmount ELSE eoi.InitOderAmountCent / 100.00 END) - (CASE WHEN oe.PayAmount > 0 THEN oe.PayAmount ELSE oe.PayAmountCent / 100.00 END)),
oi.UpdateTime = GETDATE()
FROM RB_OrderInfo oi (NOLOCK), RB_AliExpress_OrderExpand oe (NOLOCK), RB_AliExpress_OrderInfo eoi (NOLOCK)
WHERE oi.ClientOrderCode IN (SELECT ITEM FROM Charsplitforin(@ClientOrderCodes, ','))
AND oi.OrderSourceID = @OrderSourceID
AND oi.CustomerID = @CustomerID
AND oi.DownLoadUpdateTime > '2000-01-01'
AND oi.ClientOrderCode = oe.ClientOrderCode
AND oi.OrderSourceID = oe.OrderSourceID
AND oi.CustomerID = oe.CustomerID
AND oi.ClientOrderCode = eoi.AliExpressOrderID
AND oi.OrderSourceID = eoi.OrderSourceID
AND oi.CustomerID = eoi.CustomerID
PARAMS:@ClientOrderCodes = 1103601514628745 ,@OrderSourceID = 17155 ,@CustomerID = 1 ,
MESSAGE:执行超时已过期。完成操作之前已超时或服务器未响应。
The statement has been terminated.
TRACE: 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
在 RB.DAL.DBOperator.ExecuteSql(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms) 在 RB.DAL.DBOperator.toCommonTipException(SqlException ex, String sql, SqlParameter[] cmdParms)
在 RB.DAL.DBOperator.ExecuteSql(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms)
在 RB.DALExtend.Generate.RB_AliExpress_OrderInfoExtend.UpdateOrderPromotionDiscountAmount(List`1 clientOrderCodes, Int32 orderSourceId, Int32 customerId)
在 Biz.AliExpress.AliExpressV3OrderDownload.OrderDownloadByAPI(OrderAPIModel parameters)
在 Biz.PlatformUtil.AOrderDownload.DoOrderDownloadTask(IOrderDownloadUtil parameters)
在 System.Threading.Tasks.Task.Execute()
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
在 System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
在 System.Threading.ThreadPoolWorkQueue.Dispatch()
[结果]
超时 阻塞严重[期望]
oi.AliExpressOrderID 和 item 的参数类型 不一致 建议加上判断 当只有一个的时候 采用等于 多个采用标参数传值 保证类型的一致性


