Search Engine: Elastic

Article ID: 11174, created on Mar 25, 2011, last review on Jul 14, 2018

  • Applies to:
  • Business Automation


This article describes how to investigate and troubleshoot the ERROR: canceling statement due to statement timeout problem in Parallels Business Automation (PBA) 5.x.

The error message ERROR: canceling statement due to statement timeout can be found in the log of any PBA container. The corresponding entry looks like this (taken from "TASKMAN.log"):

[11-03-25 15:41:23.790 RDBMS TH2094 ERR] Code: 1000. ERROR: canceling statement due to statement timeout;
Error while executing the query ERROR: canceling statement due to statement timeout;
Error while executing the query


This error means that the query to the database was not executed within the time specified in the DB_LOCK_WAIT_TIMEOUT parameter from the global.conf file.

There are several possible causes:

  1. The query takes too much time to execute:

    a) One of the tables contains lots of data

    b) One or more tables is not optimized and grew to a large size even though it does not contain much data

  2. Another query for the same record in the table was executed at the same time. As a result, a record in a table was locked by another transaction
  3. There were two identical queries running at the same time which were initiated by two different users (a rare occurence in PBA)

Steps to investigate:

  1. Find a transaction which failed to be executed. It can be found above an error by thread ID. Using the example above, we would search for TH2094 in the log.

    a) It was a read-only select:

    SELECT DISTINCT "T148743624"."SEID", "T148743624"."EKID", ... from "AEventKind" "T146590424" cross join "Scheduler" "T148743624"  WHERE ("T148743624"."EKID") = ("T146590424"."EKID")

    This means the query took too much time too execute. The steps to resolve/improve the situation are described in Knowledgebase article #122917 .

    b) It was select for update:

    SELECT "S"."subscriptionID", "S"."SubscriptionName", "S"."IsNameCustom", "S"."Status", "S"."HoldFromStatus", "S"."ServStatus", ... FROM "Subscription" "S"  WHERE "S"."subscriptionID" = ? FOR UPDATE
    Execute [0x7f02b4024460]: 1000008

    This means there were two (sometimes more than two) transactions (e.g. updates for the same record in the table) running simultaneously. Since the record was locked by a single transaction, others failed to execute. This could be caused by a PBA bug, some redundant methods evocation, and other issues. Generally, these issues are investigated by Parallels support. However, some general recommendations can be found in Knowledgebase article #122918.

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF