ActivitiOptimisticLockingException on delete from ACT_RU_EXECUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2014 07:38 AM
I am using Activiti 5.12 and am encountering an ActivitiOptimisticLockingException on delete from ACT_RU_EXECUTION. The workflow which I created looks like the "Activiti Definition.txt" The receive task is a just sitting there, so that the timer would fire every 1 minute and kick off the service task which would run for however long it needs to take. There is a static variable within the delegate class of the service object called that will ensure that only 1 instance of the code will be processed at any 1 time.
The cause of the error which I am observing seems to be related to EXECUTION ID 2417310, if you observe the logfile during the time frame of 2014-08-11 00:03:59, activiti has accessed this value and subsequently deleted it from ACT_RU_EXECUTION at 2014-08-11 00:03:59,028. However at 2014-08-11 00:08:16,546 it tries to access the value again, and tries to delete it 1 more time. This causes a rollback in all my transactions which I have been processing during the timeframe. This exception does not seem to happen consistently. Any ideas how I might go about solving this?
Find attached the debug output
The cause of the error which I am observing seems to be related to EXECUTION ID 2417310, if you observe the logfile during the time frame of 2014-08-11 00:03:59, activiti has accessed this value and subsequently deleted it from ACT_RU_EXECUTION at 2014-08-11 00:03:59,028. However at 2014-08-11 00:08:16,546 it tries to access the value again, and tries to delete it 1 more time. This causes a rollback in all my transactions which I have been processing during the timeframe. This exception does not seem to happen consistently. Any ideas how I might go about solving this?
Find attached the debug output
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2014 04:51 AM
How many nodes do you have running an engine on? Are all of those job executors?
The error is happening after executing
2014-08-11 00:08:16,538 [pool-2-thread-9] DEBUG behavior.BpmnActivityBehavior - Leaving activity 'EBSDSServiceTask'
Are there multiple occurences of this step?
The error is happening after executing
2014-08-11 00:08:16,538 [pool-2-thread-9] DEBUG behavior.BpmnActivityBehavior - Leaving activity 'EBSDSServiceTask'
Are there multiple occurences of this step?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2014 02:47 AM
There is 1 single node running an engine with only 1 executor set to true. In my activi.xml I have a timer "EBSDSTimerEvent" that fires off the task "EBSDSServiceTask" on every 59sec of the minute. In most cases "EBSDSServiceTask" completes whatever task it does in less than a minute. However in rare cases it does take maybe 5 minutes to complete, during which time, the service task would have fired multiple times.
In the service task there I have a static variable in there to ensure that only 1 instance of the code is running.
In the service task there I have a static variable in there to ensure that only 1 instance of the code is running.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2014 12:18 PM
Jobs that take 5 minutes to complete will indeed lead to problems. The default wait time for the job executor is 5 minutes. After 5 minutes, it will deem the job as not executed and hanging.
Two solutions: Make the wait time (or the time until it can be unlocked) longer.
Better is to not have jobs that take 5 mins. Keep in mind you are keeping a db transaction open for 5 minutes! This is never a good idea.
Better is to use some queue mechanism that puts the work on a queue and sends it back to the process once its done.
Two solutions: Make the wait time (or the time until it can be unlocked) longer.
Better is to not have jobs that take 5 mins. Keep in mind you are keeping a db transaction open for 5 minutes! This is never a good idea.
Better is to use some queue mechanism that puts the work on a queue and sends it back to the process once its done.
