AnsweredAssumed Answered

lock time out

Question asked by brachi on Mar 21, 2016
Latest reply on Mar 22, 2016 by brachi
i got this exception when running in multi threads.
any ideas?

15:00:58,992 ERROR [AcquireJobsRunnable] exception during job acquisition:
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "ACT_RU_EXECUTION"; SQL statement:
select
        RES.*
    from ACT_RU_JOB RES
        LEFT OUTER JOIN ACT_RU_EXECUTION PI ON PI.ID_ = RES.PROCESS_INSTANCE_ID_
    where (RES.RETRIES_ > 0)
      and (RES.DUEDATE_ is null or RES.DUEDATE_ < ?)
      and (RES.LOCK_OWNER_ is null or RES.LOCK_EXP_TIME_ < ?)
          and (
                    (RES.EXECUTION_ID_ is null)
                        or
                        (PI.SUSPENSION_STATE_ = 1)
      )
    LIMIT ? OFFSET ? [50200-171]
### The error may exist in org/activiti/db/mapping/entity/Job.xml
### The error may involve org.activiti.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute-Inline
### The error occurred while setting parameters
### SQL: select       RES.*            from ACT_RU_JOB RES          LEFT OUTER JOIN ACT_RU_EXECUTION PI ON PI.ID_ = RES.PROCESS_INSTANCE_ID_     where (RES.RETRIES_ > 0)       and (RES.DUEDATE_ is null or RES.DUEDATE_ < ?)       and (RES.LOCK_OWNER_ is null or RES.LOCK_EXP_TIME_ < ?)    and (         (RES.EXECUTION_ID_ is null)      or       (PI.SUSPENSION_STATE_ = 1)       )       LIMIT ? OFFSET ?
### Cause: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "ACT_RU_EXECUTION"; SQL statement:
select
        RES.*
    from ACT_RU_JOB RES
        LEFT OUTER JOIN ACT_RU_EXECUTION PI ON PI.ID_ = RES.PROCESS_INSTANCE_ID_
    where (RES.RETRIES_ > 0)
      and (RES.DUEDATE_ is null or RES.DUEDATE_ < ?)
      and (RES.LOCK_OWNER_ is null or RES.LOCK_EXP_TIME_ < ?)
          and (
                    (RES.EXECUTION_ID_ is null)
                        or
                        (PI.SUSPENSION_STATE_ = 1)
      )
    LIMIT ? OFFSET ? [50200-171]
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "ACT_RU_EXECUTION"; SQL statement:

Outcomes