cancel
Showing results for 
Search instead for 
Did you mean: 

TaskQuery stucks when quering for Task

swamy2156
Champ on-the-rise
Champ on-the-rise
Hi.,

I am using activiti 5.12.1v and using Oracle database. In DB, ACT_RU_TASK table contains around 27,000 rows. While querying for task based on process instance id, While debugging came to know that its hangs at taskQuery.singleResult(). code is as follows.

      TaskQuery taskQuery =
          taskService.createTaskQuery().processInstanceId(businessProcessId);
      task = taskQuery.singleResult();

and my processEngineConfiguration bean definition as follows.

  <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
    <property name="dataSource" ref="dataSource" />
    <property name="transactionManager" ref="transactionManager" />
    <property name="databaseSchemaUpdate" value="false" />
    <property name="jobExecutorActivate" value="true" />
  </bean>


This code worked fine for couple of days earlier when there are few entries in task table but not working now. Is there any additional configuration to get rid of this? Am I only one getting this problem in activiti world?

Can someone look into this.

Thanks,
Swamy.
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
What is the configuration of your datasource? Are you sure there are enough database connections available? Also check if access to DB is still working and what the fail-timeout of the connections are.

There is no magic going on in that query, just a plain SQL-select. So must be the database…

swamy2156
Champ on-the-rise
Champ on-the-rise
Yes… After increase the maxActive size its working fine.  I came to know this when Isolated this issue in a standalone program and increased the size… Thank you for your reply.
<code>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
    <property name="driverClassName" value="${jdbc.driver}" />
    <property name="url" value="${jdbc.url}" />
    <property name="username" value="${jdbc.username}" />
    <property name="password" value="${jdbc.pwd}" />
    <property name="defaultAutoCommit" value="true" />
    <property name="maxActive" value="20" />
    <property name="maxIdle" value="10" />
</bean>
</code>

-Swamy.

frederikherema1
Star Contributor
Star Contributor
No problem, glad it's solved.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.