01-31-2018 05:03 AM
hi all!!
I am a newbie to Activiti
For the past few days i have been trying to set up Activiti in a Tomcat Docker container.My knowledge on the working of activiti and the back-end processes are very limited . But i will try my best to convey my issues.
- Activiti_container1 running on port 8080
- Activiti_container2 running on port 8081
Here is the log I get :
10:25:11,500 [pool-2-thread-1] ERROR org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable - exception during job execution: JobEntity [id=49054095] was updated by another transaction concurrently
org.activiti.engine.ActivitiOptimisticLockingException: JobEntity [id=49054095] was updated by another transaction concurrently
at org.activiti.engine.impl.db.DbSqlSession$CheckedDeleteOperation.execute(DbSqlSession.java:295)
at org.activiti.engine.impl.db.DbSqlSession.flushRegularDeletes(DbSqlSession.java:922)
at org.activiti.engine.impl.db.DbSqlSession.flushDeletes(DbSqlSession.java:888)
at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:613)
at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:212)
at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:138)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:66)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.handleMultipleJobs(ExecuteJobsRunnable.java:94)
at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
1.517394329435E12
People with more expertise say that it might work fine if there is only one Activiti container.
Can anyone help me solve this issue or help me understand the issue??
Thanks a lot !!
02-04-2018 09:27 PM
Ryan Dawson! Thanks a lot for your wonderful support.
I figured out that my problem was not actually associated with Activiti itself.
The actual problem here was that there was a database scheduler in use.
And the docker container's default time zone was set to UTC.
Setting the container time zone to local time zone resolved the issue..
01-31-2018 09:48 AM
I don't think we can know whether you could avoid this issue by running just one Activiti without knowing more about the process definition and what it is doing at the point of failure. It is a likely candidate but it might be possible to produce this error with only one Activiti (see for example). The best way to find out would probably be to try running just one and see if the problem still occurs.
01-31-2018 08:17 PM
Thanks for replying.
I forgot to mention that it works perfectly fine when Activiti is set up not inside containers.
Two Tomcats running on two different ports with Activiti works fine. This problem occurred only when it was containerized.
02-01-2018 01:19 AM
Are there any other differences between the dockerised and not dockerised versions? Is more data going into one than the other? Have you increased the memory and CPU defaults for docker? I am wondering if there are either more transactions in the docker version (would happen if more data) or perhaps they are taking longer to complete.
02-01-2018 04:40 AM
Found out that the problem occurs even when only single container is used.
Explore our Alfresco products with the links below. Use labels to filter content by product module.