PDC shows slow query on PEGA.PR_DATA_QP_RUN_PARTITION table.
Hello,
We have recently upgraded to 8.7.3 and can see that PDC prod shows slow Slow SQL on table PEGA.PR_DATA_QP_RUN_PARTITION.
Logging at least 10 events every day with a couple of them exceeding 30 seconds at times. Other times it seems to work fine.
SQL - UPDATE PEGA.pr_data_qp_run_partition "PC0" SET "PXPRODUCEDATETIME" = ? WHERE ("PC0"."PXQUEUEPROCESSORNAME" = ? AND "PC0"."PXSTREAMPARTITION" = ? AND ("PC0"."PXPRODUCEDATETIME" IS NULL OR "PC0"."PXPRODUCEDATETIME" < ?))
There is already an index on this table on columns PXQUEUEPROCESSORNAME and PXSTREAMPARTITION which is a OOTB Pega table.
Has any one else faced this issue and how it got resolved.
Thanks,
Rajesh.
***Edited by Moderator Marije to add Support Case Details; ***
I can see the following recommendations were made in INC-252581 :
"Based on the information provided, it appears that your system suffered from a temporary database connection glitch that cause the sudden PEGA0005 alert spike.
See below recommendations:
1) please consider to allocate dedicated JVM for Stream Nodes.
2) In your prconfig.xml, we found the below connection pool entries:
<env name="database/databases/PegaRULES/dataSource" value="java:comp/env/jdbc/PegaRULES"/>
<env name="database/databases/Sample/dataSource" value="java:comp/env/jdbc/Sample"/>
<env name="database/databases/PegaDATA/dataSource" value="java:comp/env/jdbc/PegaDATA"/>
When specifying the connection pool setting in prconfig.xml, the system will uses Pega's Internal connectionpool. This is a configuration used in very old version of Pega. You should not need these setting in prconfig.xml as you have defined the connection pool in Tomcat's context.xml
3) In Tomcat, in the context of JDBC connection pool, you can either use Tomcat JDBC Connection Pool org.ap.ache.tomcat.jdbc.pool or Apache Commons DBCP connection pool. When you define factory="org.apache.tomcat.jdbc.pool.DataSourceFactory", Tomcat will use Tomcat JDBC Connection Pool implementation, otherwise Tomcat will default to the Apache DBCP2 implementation.
I can see the following recommendations were made in INC-252581 :
"Based on the information provided, it appears that your system suffered from a temporary database connection glitch that cause the sudden PEGA0005 alert spike.
See below recommendations:
1) please consider to allocate dedicated JVM for Stream Nodes.
2) In your prconfig.xml, we found the below connection pool entries:
<env name="database/databases/PegaRULES/dataSource" value="java:comp/env/jdbc/PegaRULES"/>
<env name="database/databases/Sample/dataSource" value="java:comp/env/jdbc/Sample"/>
<env name="database/databases/PegaDATA/dataSource" value="java:comp/env/jdbc/PegaDATA"/>
When specifying the connection pool setting in prconfig.xml, the system will uses Pega's Internal connectionpool. This is a configuration used in very old version of Pega. You should not need these setting in prconfig.xml as you have defined the connection pool in Tomcat's context.xml
3) In Tomcat, in the context of JDBC connection pool, you can either use Tomcat JDBC Connection Pool org.ap.ache.tomcat.jdbc.pool or Apache Commons DBCP connection pool. When you define factory="org.apache.tomcat.jdbc.pool.DataSourceFactory", Tomcat will use Tomcat JDBC Connection Pool implementation, otherwise Tomcat will default to the Apache DBCP2 implementation.
Note that, you are using different connection pool implementation for jdbc/Sample comparing to jdbc/PegaRULES and jdbc/PegaDATA. Unless you have a valid business reason, we recommend to use the same implementation for all connection pools.
4) For your jdbc/PegaRULES and jdbc/PegaDATA connection pools where factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" has been defined, Tomcat will use Tomcat JDBC Connection Pool implementation. With this implementation in place, the connection parameters of maxActive, maxIdle and maxWait should be used. In your current configuration, you are using maxTotal instead of maxActive. "
Reference:
https://tomcat.apache.org/migration-8.html#Database_Connection_Pooling
https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html
Issue identified as a socket issue to be investigated with the DBA.