Failing to start multiple process at one time

Hi Guys,

I have created one custom service task from where I am starting multiple process , might be 20-30 +,
I am getting below exceptions sometimes in starting processes and sometimes all processes get start successfully

[ERROR] [2019/11/24 07:28:35.035] [pool-1-thread-5] [o.c.b.e.context] - ENGINE-16004 Exception while closing command context: 
### Error querying database.  Cause: java.sql.SQLException: Error accessing PooledConnection. Connection is invalid.
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Job.xml
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.JobEntity.selectJobsByExecutionId
### The error occurred while executing a query
### SQL: select *     from ACT_RU_JOB J     where J.EXECUTION_ID_ = ?
### Cause: java.sql.SQLException: Error accessing PooledConnection. Connection is invalid.
org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: java.sql.SQLException: Error accessing PooledConnection. Connection is invalid.
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Job.xml
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.JobEntity.selectJobsByExecutionId
### The error occurred while executing a query
### SQL: select *     from ACT_RU_JOB J     where J.EXECUTION_ID_ = ?
### Cause: java.sql.SQLException: Error accessing PooledConnection. Connection is invalid.

Could you please help me for solution to this.

@aarushi.m are using Apache DBCP or HikariCP connection pool? Which Database are using for camunda ? Connection pool size?

Hi Aravind,

We use hikari cp with 10000ms and 10 active connections

@aarushi.m which database?

postgress db

Can you provide the complete connection pooling parameters which you have configured, so that it will be easier to identify the issue.

Meanwhile, you can refer this post will be helpful:

https://inneka.com/programming/java/how-do-i-configure-hikaricp-in-my-spring-boot-app-in-my-application-properties-files