Async job are not locked in clustered applications.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2015 03:33 AM
Good afternoon!
I use two applications in a cluster.
JobExecutors configured as follows:
1 JobExecutor:
2 JobExecutor:
If i start two applications in a cluster with a single database where all nodes are located on different servers,
one application performs its own jobs, and the other performs its own jobs and jobs of the first application.
If I start all nodes in the cluster on 1 server (ie, two applications and the database with which they work are on one server), everything works fine.
All jobs locked and executed correctly.
Applications are the same.
Network delay may well affect the operation of applications?
Is there any setting in the Activiti to deal with this problem?
I use two applications in a cluster.
JobExecutors configured as follows:
1 JobExecutor:
<property name="jobExecutor" ref="jobExecutor" /><property name="jobExecutorActivate" value="false" /><property name="asyncExecutor" ref="asyncExecutor" /><property name="asyncExecutorEnabled" value="true" /><property name="asyncExecutorActivate" value="true" /><property name="defaultFailedJobWaitTime" value="1" /><property name="asyncFailedJobWaitTime" value="1" /><property name="history" value="full" /><property name="dbIdentityUsed" value="false" /><property name="dbHistoryUsed" value="true" /><bean id="jobExecutor" class="org.activiti.engine.impl.jobexecutor.DefaultJobExecutor"> <property name="corePoolSize" value="25" /> <property name="maxPoolSize" value="50" /> <property name="keepAliveTime" value="3000" /> <property name="queueSize" value="200" /> <property name="lockTimeInMillis" value="5000" /> <property name="lockOwner" value="app1" /> <property name="maxJobsPerAcquisition" value="1" /></bean>
2 JobExecutor:
<property name="jobExecutor" ref="jobExecutor" /><property name="jobExecutorActivate" value="false" /><property name="asyncExecutor" ref="asyncExecutor" /><property name="asyncExecutorEnabled" value="true" /><property name="asyncExecutorActivate" value="true" /><property name="defaultFailedJobWaitTime" value="1" /><property name="asyncFailedJobWaitTime" value="1" /><property name="history" value="full" /><property name="dbIdentityUsed" value="false" /><property name="dbHistoryUsed" value="true" /><bean id="jobExecutor" class="org.activiti.engine.impl.jobexecutor.DefaultJobExecutor"> <property name="corePoolSize" value="25" /> <property name="maxPoolSize" value="50" /> <property name="keepAliveTime" value="3000" /> <property name="queueSize" value="200" /> <property name="lockTimeInMillis" value="5000" /> <property name="lockOwner" value="app2" /> <property name="maxJobsPerAcquisition" value="1" /></bean>
If i start two applications in a cluster with a single database where all nodes are located on different servers,
one application performs its own jobs, and the other performs its own jobs and jobs of the first application.
If I start all nodes in the cluster on 1 server (ie, two applications and the database with which they work are on one server), everything works fine.
All jobs locked and executed correctly.
Applications are the same.
Network delay may well affect the operation of applications?
Is there any setting in the Activiti to deal with this problem?
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2015 04:24 PM
Is there a time difference in the system clocks between these servers?
Best regards,
Best regards,

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2015 03:09 AM
Yes, its about 1,5 min difference.
Can i fix this with
<code>
<property name="keepAliveTime" value="3000" />
<property name="lockTimeInMillis" value="5000" />
</code>
Maybe i should increase these values?
Can i fix this with
<code>
<property name="keepAliveTime" value="3000" />
<property name="lockTimeInMillis" value="5000" />
</code>
Maybe i should increase these values?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2015 06:43 AM
1,5 min difference is a lot. Isn't it possible to keep the clocks in sync?
You can read about the configuration options here:
http://activiti.org/userguide/index.html#_async_executor_configuration
Best regards,
You can read about the configuration options here:
http://activiti.org/userguide/index.html#_async_executor_configuration
Best regards,
