Update conflict Exception in 8.18.19

0
Hi Team, Iam seeing this while trying to run a batch process. can you please tell me  what went wrong here. i recently updated my mendix version from 7.23.21 to 8.18.19. I get this below error.  ActionManager Exception in execution of monitored action 'Logging.CleanupData' (execution id: 0fbddf23-587a-4325-ab99-8108a98be528, execution type: SCHEDULED_EVENT) 2023-06-16 15:47:02.178 ActionManager Exception in execution of monitored action 'EmailTemplate.SE_SendQueuedEmails' (execution id: 813932d3-575a-459f-a308-59199300030a, execution type: SCHEDULED_EVENT) 2023-06-16 15:44:04.086 ActionManager Exception in execution of monitored action 'Logging.CleanupData' (execution id: 35847b54-7556-4755-9498-47ffeb5ee88f, execution type: SCHEDULED_EVENT) Timestamp 2023-06-16 16:21:01.644 Level Error Node ActionManager Message Exception in execution of monitored action 'Logging.CleanupData' (execution id: f855ff43-f3d6-4953-a8d0-05e228d8e8e8, execution type: SCHEDULED_EVENT) Stack trace com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.datastorage.exception.UpdateConflictException at Logging.CleanupData (Delete : 'delete messages') Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:85) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.datastorage.exception.UpdateConflictException at com.mendix.basis.actionmanagement.ActionManagerBase.executeInTransactionSync(ActionManagerBase.java:123) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.datastorage.exception.UpdateConflictException at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:156) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.datastorage.exception.UpdateConflictException at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:30) Caused by: com.mendix.datastorage.exception.UpdateConflictException at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.withPreparedStatement(JdbcDataStoreBase.scala:582) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.$anonfun$execModificationQueries$1(JdbcDataStoreBase.scala:328) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.$anonfun$execModificationQueries$1$adapted(JdbcDataStoreBase.scala:328) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.$anonfun$executeWithUcViolationHandling$1(JdbcDataStoreBase.scala:496) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18) at scala.util.Try$.apply(Try.scala:210) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.executeWithUcViolationHandling(JdbcDataStoreBase.scala:496) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.doModificationQueries$1(JdbcDataStoreBase.scala:331) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.execModificationQueries(JdbcDataStoreBase.scala:341) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.execDeleteQueries(JdbcDataStoreBase.scala:290) at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.store(JdbcDataStore.java:476) at com.mendix.connectionbus.store.EntityStorer.storeDataSetInstance(EntityStorer.java:258) at com.mendix.connectionbus.store.EntityStorer.handleDeleteRequest(EntityStorer.java:235) at com.mendix.connectionbus.store.EntityStorer.handleRequest(EntityStorer.java:156) at com.mendix.connectionbus.store.EntityStorer.store(EntityStorer.java:76) at com.mendix.connectionbus.RequestAnalyzer.doRequest(RequestAnalyzer.java:77) at com.mendix.connectionbus.ConnectionBusImpl.doRequest(ConnectionBusImpl.java:529) at com.mendix.basis.action.user.DeleteAction.deleteFromDatabase(DeleteAction.scala:96) at com.mendix.basis.action.user.DeleteAction.executeAction(DeleteAction.scala:53) at com.mendix.basis.action.user.DeleteAction.executeAction(DeleteAction.scala:27) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54) at com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:147) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:26) at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:152) at com.mendix.basis.actionmanagement.ActionManagerBase.executeInTransactionSync(ActionManagerBase.java:116) at com.mendix.basis.component.InternalCoreBase.delete(InternalCoreBase.java:253) at com.mendix.basis.component.InternalCoreBase.delete(InternalCoreBase.java:232) at com.mendix.basis.component.InternalCoreBase.delete(InternalCoreBase.java:264) at com.mendix.modules.microflowengine.actions.mxobject.DeleteAction.execute(DeleteAction.scala:29) at com.mendix.modules.microflowengine.actions.mxobject.DeleteAction.execute(DeleteAction.scala:15) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.$anonfun$execute$1(MicroflowObject.scala:32) at scala.Option.flatMap(Option.scala:283) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.scala:29) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.$anonfun$executeAfterBreakingIfNecessary$2(MicroflowImpl.scala:172) at scala.Option.flatMap(Option.scala:283) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.scala:172) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.scala:119) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54) at com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:147) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:26) at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:152) at com.mendix.basis.actionmanagement.MicroflowCallBuilderImpl.execute(MicroflowCallBuilderImpl.scala:40) at com.mendix.basis.actionmanagement.UserScheduledAction.executeScheduledAction(UserScheduledAction.scala:39) at com.mendix.basis.actionmanagement.ScheduledAction$ScheduledRun.$anonfun$run$1(ScheduledAction.scala:26) at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:26) at com.mendix.basis.actionmanagement.IMonitoredAction.monitor(IMonitoredAction.scala:49) at com.mendix.basis.actionmanagement.IMonitoredAction.monitor$(IMonitoredAction.scala:25) at com.mendix.basis.actionmanagement.ScheduledAction$ScheduledRun.monitor(ScheduledAction.scala:14) at com.mendix.basis.actionmanagement.ScheduledAction$ScheduledRun.run(ScheduledAction.scala:26) at com.mendix.basis.actionmanagement.ScheduledAction.execute(ScheduledAction.scala:67) at com.mendix.basis.actionmanagement.ScheduledAction.run(ScheduledAction.scala:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 136) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:265) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1662) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatementBatch(SQLServerPreparedStatement.java:2830) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtBatchExecCmd.doExecute(SQLServerPreparedStatement.java:2694) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7417) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3488) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:262) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:237) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:2092) at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:241) at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:241) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.doModification(JdbcDataStoreBase.scala:374) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.doDelete(JdbcDataStoreBase.scala:314) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.$anonfun$execDeleteQueries$2(JdbcDataStoreBase.scala:290) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.$anonfun$execDeleteQueries$2$adapted(JdbcDataStoreBase.scala:290) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.$anonfun$execModificationQueries$2(JdbcDataStoreBase.scala:329) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.$anonfun$execModificationQueries$2$adapted(JdbcDataStoreBase.scala:329) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.$anonfun$executeWithUcViolationHandling$2(JdbcDataStoreBase.scala:496) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.$anonfun$executeWithUcViolationHandling$2$adapted(JdbcDataStoreBase.scala:496) at com.mendix.connectionbus.connections.jdbc.JdbcDataStoreBase.withPreparedStatement(JdbcDataStoreBase.scala:563) ... 63 more
asked
1 answers
1

In your stack trace I see the following:

 

Transaction (Process ID 136) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

 

This means that a deadlock is causing your error. It looks like in 8.18.0 Mendix already made some changes to reduce the chance of deadlocks, but that doesn't make them impossible. 

 

This forum question is a good resource on how to prevent deadlocks: 

https://forum.mendix.com/link/space/app-development/questions/3612

answered