Back ForwardHow to limit connections to the PegaRULES database

GENTJ 1/28/03 Process Commander may open many database connections to the PegaRULES database. When started, the system opens two connections. To provide good response to requestors, the system uses a pool of connections over time. In most cases, the pool is created and managed by the application server such as WebSphere, not by Process Commander, but the prconfig Dynamic Syetem Settings described here control the size of the pool and the timeout interval.

If database access is later needed at a moment when all existing connections are busy, the system creates an additional connection. Connections remain open until Process Commander is stopped, or until they are idle for 5 minutes or longer. Q-434 R-14073

To change the amount of time a connection must be idle before being marked for closure, use the following prconfig Dynamic System Setting:

Dynamic System Setting: prconfig/XXXX/XXXX/default

The prconfig/xxxxx/xxxxx/default setting

The following values are valid for this Dynamic System Setting:

Value

Description

xxxxx xxxxx (Default)
xxxxx xxxxx

CautionChange this setting with care. Prconfig Dynamic System Settings can have broad impact on the operation of your system. See How to create or update a prconfig setting.

 

(The value of IdleConnectionTimeout in the prconfig.xml file defines the interval, in seconds, after which an idle connection is marked to be closed.)

As initially installed, the system does not limit on the number of open connections created. GAJNJ R-14068 04-01SP4Using an optional prconfig Dynamic System Setting, you can limit the size of this pool:

Dynamic System Setting: prconfig/XXXX/XXXX/default

The prconfig/xxxxx/xxxxx/default setting

The following values are valid for this Dynamic System Setting:

Value

Description

xxxxx xxxxx (Default)
xxxxx xxxxx

Dynamic System Setting: prconfig/XXXX/XXXX/default

The prconfig/xxxxx/xxxxx/default setting

The following values are valid for this Dynamic System Setting:

Value

Description

xxxxx xxxxx (Default)
xxxxx xxxxx

Dynamic System Setting: prconfig/XXXX/XXXX/default

The prconfig/xxxxx/xxxxx/default setting

The following values are valid for this Dynamic System Setting:

Value

Description

xxxxx xxxxx (Default)
xxxxx xxxxx

CautionChange this setting with care. Prconfig Dynamic System Settings can have broad impact on the operation of your system. See How to create or update a prconfig setting.

 

 

1. Open the prconfig.xml file with an XML editor or text editor.

2. Locate the PegaRULES database username and password entries.

3. Add the following

<env name="database/databases/pegarules/maxConnections"
      value="20"/><env name="database/databases/pegarules/maxConnectionsTimeout"
      value="30"/>

to limit the size of the pool to 20 connections, and cause a Java exception if the connection pool is empty for 30 seconds when a requestor is waiting.

4. Save the updated file. Undeploy and redeploy to make this change effective.

However, if the limit is reached and all connections are busy when an additional database request arrives, the requestor waits. After 10 seconds (or another interval set in the maxConnectionsTimeout value), if no connection is available, a Java DatabaseException is thrown. REMOVE??? (This timeout interval can be set to a higher or lower value with the maxConnectionsTimeout parameter.) B-18562

Don't set this limit too low, or deadlocks and poor response may result. You can set a threshold for PEGA0026 alerts to detect long waits.

For more information, see the Pega Developer Network article PDNPRKB-17232 How to set the maximum number of JDBC connections to the PegaRULES database.

Definitions PegaRULES database
Related topics About Database data instances
How detect long database connection waits
Working with the PegaRULES database

UpSysAdmin category