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
There are several possible causes:
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
- 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
- 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:
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
TH2094in 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.