AnsweredAssumed Answered

Multiple exceptions when stressing a workflow

Question asked by rufini on Jul 5, 2011
Latest reply on Jun 22, 2012 by ronald.van.kuijk
Hi. I'm having random errors when stressing my app.

I made a workflow with a UserTask that times out after 200 sec.

With a JMeter, I set up:

1) Request via GET the execution id "askForExecutionID"
2) Post that execution id with some extra data to process "processData"

In JMeter\Thread Group, I set: 100 threads & ramp-up period: 10 seconds

I start the tomcat, and run the JMeter, and, after a time, I got the 100 "askForExecutionID" OK and [usually] the 100 "processData" also OK.

But, when I run it a few times [waiting to all threads ends], I start to get random errors [about 13-25%] in the "processData"s.

The exceptions may vary and are:


org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[39844] was updated by another transaction concurrently


org.activiti.engine.ActivitiOptimisticLockingException: ExecutionEntity[6246] was updated by another transaction concurrently


org.activiti.engine.ActivitiException: Cannot find task with id 6432


org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: com.mysql.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
### The error may involve org.activiti.engine.impl.persistence.entity.HistoricTaskInstanceEntity.updateHistoricTaskInstance-Inline
### The error occurred while setting parameters
### Cause: com.mysql.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction

My config:

org.springframework.jdbc.datasource.SimpleDriverDataSource (com.mysql.jdbc.Driver)
org.springframework.jdbc.datasource.DataSourceTransactionManager


   <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
      <property name="dataSource" ref="dataSource" />
      <property name="transactionManager" ref="transactionManager" />
      <property name="databaseSchemaUpdate" value="true" />
      <property name="jobExecutorActivate" value="true" />
      <property name="deploymentResources" value="some.bpmn20.xml" />
      <property name="beans">
         <map>
            <entry key="timeoutTask" value-ref="timeoutTask"/>
         </map>
      </property>
   </bean>


Please, letme know wich config data can I post to make this question cleaner.

Thanks in advance!
rufini

Outcomes