Scheduler error

0
Hi All, I have a scheduled event that runs once a day and I am creating some tasks with it. The schedular used to work on for so long and now the scheduled event stops frequently. And I'm having an error as follows as per the log messages:   2023-01-31T22:06:52.877848 [APP/PROC/WEB/0]    ERROR - ActionManager: Exception in execution of monitored action 'AdminModule.SCE_WorkOrder_Create_Schedular' (execution id: 52d39ac3-8366-419e-8536-1ae5420859a8, execution type: SCHEDULED_EVENT) 2023-01-31T22:06:52.877865 [APP/PROC/WEB/0]    ERROR - ActionManager: com.mendix.modules.microflowengine.MicroflowException: Failed to commit 2023-01-31T22:06:52.877882 [APP/PROC/WEB/0]       at AdminModule.SUB_Checklist_Summary_Adoption (Change : 'Change 'AdoptionTracking_Daily' (PlantName, BlockName, EquipmentID, EquipmentName, AdoptionTracking_Plant, AdoptionTracking_Block, AdoptionTracking_Equipment, RaisedCount, ARTOpenCount, IsChecklistSummary, FrequencyName, TotalCount, NotExcutedCount, OverdueStatus)') 2023-01-31T22:06:52.877935 [APP/PROC/WEB/0]       at AdminModule.SUB_WorkOrder_Daily (SubMicroflow : 'SUB_Checklist_Summary_Adoption') 2023-01-31T22:06:52.877960 [APP/PROC/WEB/0]       at AdminModule.SCE_WorkOrder_Create_Schedular.nested.0ef88574-2904-40b6-825f-892dc23b7e12.nested.acda3def-7423-414f-bc45-2371d2a4ed92 [6 of 9] (SubMicroflow : 'SUB_WorkOrder_Daily') 2023-01-31T22:06:52.878020 [APP/PROC/WEB/0]       at AdminModule.SCE_WorkOrder_Create_Schedular.nested.0ef88574-2904-40b6-825f-892dc23b7e12 [2282 of 4139] (NestedLoopedMicroflow : '') 2023-01-31T22:06:52.878036 [APP/PROC/WEB/0]       at AdminModule.SCE_WorkOrder_Create_Schedular (NestedLoopedMicroflow : '') 2023-01-31T22:06:52.878140 [APP/PROC/WEB/0]   Advanced stacktrace: 2023-01-31T22:06:52.878152 [APP/PROC/WEB/0]       at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:152) 2023-01-31T22:06:52.878166 [APP/PROC/WEB/0]   Caused by: com.mendix.core.CoreRuntimeException: Failed to commit 2023-01-31T22:06:52.878214 [APP/PROC/WEB/0]       at com.mendix.basis.component.CommitHandler.commit(CommitHandler.scala:151) 2023-01-31T22:06:52.878291 [APP/PROC/WEB/0]   Caused by: com.mendix.core.CoreRuntimeException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.basis.connectionbus.ConnectionBusException: Exception occurred while updating data. (SQL State: 40P01, Error Code: 0) 2023-01-31T22:06:52.878320 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.ActionManagerBase.executeInTransactionSync(ActionManagerBase.java:123) 2023-01-31T22:06:52.878428 [APP/PROC/WEB/0]   Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.basis.connectionbus.ConnectionBusException: Exception occurred while updating data. (SQL State: 40P01, Error Code: 0) 2023-01-31T22:06:52.878452 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:156) 2023-01-31T22:06:52.878556 [APP/PROC/WEB/0]   Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.basis.connectionbus.ConnectionBusException: Exception occurred while updating data. (SQL State: 40P01, Error Code: 0) 2023-01-31T22:06:52.878625 [APP/PROC/WEB/0]       at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) 2023-01-31T22:06:52.878668 [APP/PROC/WEB/0]   Caused by: com.mendix.basis.connectionbus.ConnectionBusException: Exception occurred while updating data. (SQL State: 40P01, Error Code: 0) 2023-01-31T22:06:52.878735 [APP/PROC/WEB/0]       at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.getCorrectException(JdbcDataStore.java:729) 2023-01-31T22:06:52.878890 [APP/PROC/WEB/0]   Caused by: org.postgresql.util.PSQLException: ERROR: deadlock detected 2023-01-31T22:06:52.878902 [APP/PROC/WEB/0]     Detail: Process 5080 waits for ShareLock on transaction 40880439; blocked by process 28315. 2023-01-31T22:06:52.878906 [APP/PROC/WEB/0]   Process 28315 waits for ShareLock on transaction 40858721; blocked by process 5080.   Can we handle this using error handling? Or restarting a server for the environment will work here? If anyone has any suggestions or any other Workaround, please let me know.  Thanks!
asked
1 answers
0

Heey Aditya,

In one of the last lines of the error i see the following: "2023-01-31T22:06:52.878890 [APP/PROC/WEB/0]   Caused by: org.postgresql.util.PSQLException: ERROR: deadlock detected”

Could it be possible that in you event some tasks are added to the same list multiple times and then commited all at once? It seems that the same object is being commited more then once at the same time.

 

Kind regards,

Edo

answered