Support Article
Configuring database query timeout
SA-14905
Summary
When a DB Query takes more than a certain amount of time, due to any reason, the application waits for it to complete. This causes performance related issues, such as, running out of Connection Pool or an increased backlog of queries to be fired.
PRPC by default throws an alert, but does not kill the query.
How can one configure the application to throw and catch an exception in case the query takes more than a certain amount of time?
Resolution
Pega provides no method within, for configuring a DB timeout to drop long running DB requests as requested. This can be performed directly at the DB level. However, we do not recommend this implementation. Abandoning long-running DB requests, even if they are causing performance issues, can instead solve a moderate performance issue by introducing a severe data integrity issue. You should instead diagnose and treat problematic database requests on a case-by-case basis rather than attempting to implement a timeout system.
Published October 20, 2015 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.