Parallel jobs for Service task are not executing

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Parallel jobs for Service task are not executing

Hi,

I'm having issue in executing parallel service task. It is not able to run more than 8 jobs parallel.  I have 15 services task should run parallel and service task long run service task. If one get completed from 8 jobs then other one is starting even though all tasks are parallel

 I have below configuration for DefaultAsyncJobExecutor. I'm using 5.18.0. 

<bean id="asyncExecutor" class="org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor">
<property name="corePoolSize" value="150" />
<property name="maxPoolSize" value="2000" />

 <property name="queueSize" value="200" />

<property name="asyncJobLockTimeInMillis" value="172800000" />
</bean>

Could someone please help. 

6 Replies
Highlighted
Established Member II

Re: Parallel jobs for Service task are not executing

Hi Smith B ,

What do you mean by 'parallel' here? 

Are you referring to multi-instance loop (Activiti User Guide ) or parallel gateway (Activiti User Guide) ?

Thanks,

Thong Huynh

Highlighted
Intermediate

Re: Parallel jobs for Service task are not executing

On startup, the engine will log the pool sizes as well as the keepalive time.

Let's make sure your settings have been picked up by checking for the log entries.
They should look something like:

09:31:07,320 [localhost-startStop-1] INFO org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor - Creating thread pool queue of size 100
09:31:07,321 [localhost-startStop-1] INFO org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor - Creating executor service with corePoolSize 2, maxPoolSize 10 and keepAliveTime 5000

Thanks,
greg

Highlighted
Member II

Re: Parallel jobs for Service task are not executing

Thanks for the reply Greg and Thong.

We have verified the logs and it was picking up the configured properties. We have tried to use 5.22.0. But still facing same issue.

2017-01-27 11:18:16 INFO ProcessEngineImpl:85 - ProcessEngine default created
2017-01-27 11:18:16 INFO AbstractAsyncJobExecutor:119 - Starting up the default async job executor [org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor].
2017-01-27 11:18:16 INFO DefaultAsyncJobExecutor:75 - Creating thread pool queue of size 50
2017-01-27 11:18:16 INFO DefaultAsyncJobExecutor:80 - Creating executor service with corePoolSize 10, maxPoolSize 20 and keepAliveTime 5000
2017-01-27 11:18:16 INFO AcquireTimerJobsRunnable:45 - starting to acquire async jobs due
2017-01-27 11:18:16 INFO AcquireAsyncJobsDueRunnable:45 - starting to acquire async jobs due

Highlighted
Intermediate

Re: Parallel jobs for Service task are not executing

<snip>

Creating executor service with corePoolSize 10, maxPoolSize 20

</snip>

This doesnt appear to match the settings you posted earlier in your thread.

Are you sure the parameters are being picked up?

Highlighted
Member II

Re: Parallel jobs for Service task are not executing

Hi Greg,

Even for corePoolSize 10 it is running only 8 jobs. Somehow I'm not able to figure out the issue. I have tried multiple machine and having the same issue. 

Sorry for the late reply.

Highlighted
Intermediate

Re: Parallel jobs for Service task are not executing

Probably not much more I can offer without a unit test, from your description you should be running up to max async jobs, but the devil is aleays in the detail, so a unit test is probably necessary at this point.

Greg