AnsweredAssumed Answered

Db connections number

Question asked by alper on Nov 30, 2014
Latest reply on Dec 2, 2014 by alper
Hi,
I use Activiti Enginein my webapp deployed on JBoss.
I don't use jdbc directly, but JNDI datasource:


processEngine = ProcessEngineConfiguration
            .createStandaloneInMemProcessEngineConfiguration()
            .setDatabaseSchemaUpdate(
                  ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE)
            .setDataSourceJndiName("java:jboss/datasources/ActivitiDS")


I enabled pooling in JBoss by adding into the standalone.xml:


                    <pool>
                        <min-pool-size>50</min-pool-size>
                        <max-pool-size>200</max-pool-size>
                        <prefill>true</prefill>
                    </pool>


But anyway when I concurrently start 100 workflows in separate threads by doing:


runtimeService = processEngine.getRuntimeService();
               ProcessInstance startProcessInstanceByKey = runtimeService
                     .startProcessInstanceByKey("emptyParent", request);

I am getting freezed threads and exception at the end:

Error updating database.  Cause: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "ACT_HI_PROCINST";.

How to cure that?

Outcomes