Problem
Example scenario
Explanation
Environments
Solutions
Related content
Problem
When you run a report, it times out after 90 seconds and does not yield complete results.
Example scenario
Managers need to run an annual report on demand to know each employee´s performance for yearly evaluation.
This report definition includes queries to fetch rows in two tables:
- For case instances, pc_work
- For the history of case instances, pc_history_work
Every time managers run this report each year, the reports takes an excessively long time to generate results and times out after 90 seconds, yielding incomplete results.
To get a report with full-year results, managers must run the report several times, reducing the date range to three (3) months each time and running the report four (4) times.
Running the report in increments to work around the elapsed-time restriction takes time, reducing manager productivity.
Explanation
Queries in report definitions are restricted to run for a maximum elapsed time of 90 seconds. This built-in limitation protects the system from long queries that would consume resources that are not optimized or that are incorrect.
When a report times out because of this restriction, you need to know about the restriction and how to address it.
As a product enhancement, creation of a proper index on the report definition´s query could improve performance.
Environments
The problem was reported in the following environments:
- Pega Platform™ version 8.5.6
- Pega Cloud® services version 2.23
Solutions
Prerequisite
Submit a Pega Support service request
Make a local change
Prerequisite
Before you request the report definition query change, you must confirm that the report works successfully in a local database environment and that all queries work. This ensures transparency and confirms for the Pega support team that they are extending the correct report query runtimes.
Submit a Pega Support service request
Request the report definition query change according to your Pega deployment environment.
If your deployment is a Pega Platform on-premises environment, you need to submit a service request .
If your deployment is a Pega Cloud® services environment, you need to submit a service request .
Make a local change
Perform the following workaround:
Update Context Settings by adding connectionProperties to increase the following settings:
timeout=240500
idle_in_transaction_session_timeout=240500
socketTimeout=240
See Using scripting with direct connection to the database and the prpcUtils tool and Populating properties by using a direct connection to the database.
Related content
Product documentation
Setting resource limits for reporting
Optimizing properties from the user interface
Database stability and recommended connection pool settings
Support Center questions
Set report definition timeout error
Urgent: perfectly working report definition suddenly stops working