Multi-Company Centralized AP Concerning Error

Anyone who uses Centralized AP - have you seen this Multi-Company Log Error? It happens on a daily basis 1-2x. I haven’t found really any data corruption, but sometimes its a deadlock, sometimes its a The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION error.

Error: System.Data.SqlClient.SqlException (0x80131904): The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.

@JeffLeBert do you know if this should be concerning it kind of started with 10.2.600 - New TA Architecture.

We usually post 5 Groups within milliseconds apart, unrelated to each other and I see this error often - could this be causing Data Corruption?

I bet If I wait 1 minute before each posting of the child Group it may probably work… but with our volume that’ would be slow. I wonder if its merely a timing issue.

I have no experience with Multi-Company. I agree it looks like a timing issue, but that doesn’t help much. I can’t tell if this would cause corruption.

If a minute is too long then maybe 5 seconds would work? It is hard to tell. At this point, we are just trying to work around what appears to be a bug.

In any case, you need to report this so somebody can investigate. Sorry for not being very helpful.

1 Like

Sometimes its a deadlock

Error: System.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 1121) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)
   at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
   at System.Data.SqlClient.SqlDataReader.Read()
   at lambda_method(Closure , SqlDataReader , List`1 )
   at Epicor.ServiceModel.Tableset.DBReaderAdapter.LoadFromReader[TData](SqlDataReader reader, List`1 table, IceColumnCollection iceColumns) in C:\_Releases\ICE\UD10.2.600.13FW\Source\Framework\Epicor.System\Data\DataReader\DBReaderAdapter.cs:line 83
   at Ice.SystemIntegration.Integration.GetIMTable[TLinqRow](String whereClause, LockHint lockHint) in C:\_Releases\ICE\UD10.2.600.13FW\Source\Framework\Epicor.Ice\SystemIntegration\Integration.cs:line 454
   at Ice.SystemIntegration.Integration.GetIMTable[TLinqRow](Int32 queueID, LockHint lockHint) in C:\_Releases\ICE\UD10.2.600.13FW\Source\Framework\Epicor.Ice\SystemIntegration\Integration.cs:line 422
   at Erp.Internal.SI.MT.MTAPInvHedImpVal.ValidateAPInvcSched(Int32 pIntQueID) in C:\_Releases\ERP\UD10.2.600.13\Source\Server\Internal\SI\MT\MTAPInvHedImpVal\MTAPInvHedImpVal.cs:line 200
   at Erp.Internal.SI.MT.MTAPInvHedImpVal.RunMTAPInvHedImpVal(Int32 pIntQueID, List`1& tt_EFValidation) in C:\_Releases\ERP\UD10.2.600.13\Source\Server\Internal\SI\MT\MTAPInvHedImpVal\MTAPInvHedImpVal.cs:line 193
ClientConnectionId:17404e9f-e2df-40fe-a5d8-6faf0378d59d
Error Number:1205,State:51,Class:13
2/3/2021 4:28:15 PM (Server:localhost PID:9140 DB:server01\EpicorERP Task:2509002) Multi-Company Process - Error: Stack Trace 
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)
   at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
   at System.Data.SqlClient.SqlDataReader.Read()
   at lambda_method(Closure , SqlDataReader , List`1 )
   at Epicor.ServiceModel.Tableset.DBReaderAdapter.LoadFromReader[TData](SqlDataReader reader, List`1 table, IceColumnCollection iceColumns) in C:\_Releases\ICE\UD10.2.600.13FW\Source\Framework\Epicor.System\Data\DataReader\DBReaderAdapter.cs:line 83
   at Ice.SystemIntegration.Integration.GetIMTable[TLinqRow](String whereClause, LockHint lockHint) in C:\_Releases\ICE\UD10.2.600.13FW\Source\Framework\Epicor.Ice\SystemIntegration\Integration.cs:line 454
   at Ice.SystemIntegration.Integration.GetIMTable[TLinqRow](Int32 queueID, LockHint lockHint) in C:\_Releases\ICE\UD10.2.600.13FW\Source\Framework\Epicor.Ice\SystemIntegration\Integration.cs:line 422
   at Erp.Internal.SI.MT.MTAPInvHedImpVal.ValidateAPInvcSched(Int32 pIntQueID) in C:\_Releases\ERP\UD10.2.600.13\Source\Server\Internal\SI\MT\MTAPInvHedImpVal\MTAPInvHedImpVal.cs:line 200
   at Erp.Internal.SI.MT.MTAPInvHedImpVal.RunMTAPInvHedImpVal(Int32 pIntQueID, List`1& tt_EFValidation) in C:\_Releases\ERP\UD10.2.600.13\Source\Server\Internal\SI\MT\MTAPInvHedImpVal\MTAPInvHedImpVal.cs:line 193
2/3/2021 4:28:15 PM (Server:localhost PID:9140 DB:server01\EpicorERP Task:2509002) Multi-Company Process - ...Processed Inbound APInvHed (FCO/FLX) (172136) [Time to complete: 00:00:00:953]...
2/3/2021 4:28:15 PM (Server:localhost PID:9140 DB:server01\EpicorERP Task:2509002) Multi-Company Process - Error: System.Data.SqlClient.SqlException (0x80131904): The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlDelegatedTransaction.SinglePhaseCommit(SinglePhaseEnlistment enlistment)
ClientConnectionId:17404e9f-e2df-40fe-a5d8-6faf0378d59d
Error Number:3902,State:3,Class:16
2/3/2021 4:28:15 PM (Server:localhost PID:9140 DB:server01\EpicorERP Task:2509002) Multi-Company Process - Error: Stack Trace 
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlDelegatedTransaction.SinglePhaseCommit(SinglePhaseEnlistment enlistment)
2/3/2021 4:28:15 PM (Server:localhost PID:9140 DB:server01\EpicorERP Task:2509002) Multi-Company Process - ...Processed Inbound APInvHed (FCO/FDS) (172132) [Time to complete: 00:00:00:984]...
2/3/2021 4:28:15 PM (Server:localhost PID:9140 DB:server01\EpicorERP Task:2509002) Multi-Company Process - 1 Inbound Records Processed (FCO/FDS)
2/3/2021 4:28:15 PM (Server:localhost PID:9140 DB:server01\EpicorERP Task:2509002) Multi-Company Process - ...Processing Inbound APInvHed (FCO/FDS) (172133)...
2/3/2021 4:28:16 PM (Server:localhost PID:9140 DB:server01\EpicorERP Task:2509002) Multi-Company Process - ...Processed Inbound APInvHed (FCO/FDS) (172133) [Time to complete: 00:00:00:437]...

I agree, wasn’t sure if you had any “known issue” your working on related to this. I couldnt find any PRB’s with it.

Will have to report it, have someone investigate. I need to build a DEV test-case and Rapid Post groups, see how many times I can replicate it, so I can pass along “replication steps”.

I searched our bug database, but didn’t find a match. Very possible I could miss it though.

1 Like

Thank you for checking. We will have to report it. It’s sporadic (timing issue). I narrowed it down to only when we do rapid-posts using our “DocStar” equivalent software. Sometimes it has no issues, sometimes it does.

image

In the interim perhaps adjust our timers to pause a moment, in between.

As far as I know the “record in use” error can happen when the sending company is still working on the record when the receiving company tries to process it.

However not sure why the COMMIT error happens, I don’t see anything particularly wrong unless I’m looking at the wrong place.

1 Like

Gotcha - we do run ours on Continuous processing so that definitely may play a role in it.