Configuring connection pools for external databases by using the prconfig file

External database connections through a Java Database Connectivity (JDBC) URL are managed by Pega Platform and use connection pools to handle requestor traffic. You can modify the default connection pools to limit or increase connections and their timeout value that is created for each database user to optimize connectivity for your environment. You can modify default connection pool sizes per user type and the connection timeout by editing the prconfig.xml file.

Before you begin: 
Note: This procedure applies to only on-premises and client-managed cloud deployments. Dynamic system settings can facilitate connection pool configuration while offering the same functionality. For more information about modifying connection pool sizes through dynamic system settings, see Configuring connection pools for an external database.

Gather the following details:

  • The name of the database that you created for an external database connection.
  • Standard user credentials created on the external database.
  • Optional: Admin user and read-only user credentials if they have been configured on the external database.

The pool keeps idle connections ready. The system creates additional connections when all existing connections are busy until they reach the connection pool size value. When a requestor arrives and the maximum number of connections are busy, the requestor waits until reaching the connection timeout value. Database connections remain open until Pega Platform stops running.

Connection pool sizes and the timeout settings have the following default values:

  • Connection pools:
    • Standard user – 20 connections
    • Administrator – 5 connections (if an administrator is configured on the external database)
    • Read-only user – 5 connections (if a read-only user is configured on the external database)
  • Connection timeout: 300 seconds

    The timeout value applies to all connections on this node.

  1. Extract the prconfig.xml file. For more information, see Changing node settings by modifying the prconfig.xml file.
  2. Open the prconfig.xml file with an XML or text editor.
  3. Modify the values of the following settings:
    1. Modify the values for the connection pool size (value="n") for the standard user, administrator, and read-only user.
      Use the following variables:
      • Standard user: <env name="database/databases/<database name>/connectionPoolSize" value="20"/>
      • Administrator: <env name="database/databases/<database name>/admin/connectionPoolSize" value="5"/>
      • Read-only: <env name="database/databases/<database name>/readonly/connectionPoolSize" value="5"/>
    2. Modify the connection timeout in seconds (value ="n") by editing the timeout variable:

      <env name="database/databases/<database name>/maxConnectionsTimeout" value="300"/>

  4. Save the updated file.
  5. Repeat steps 1 through 4 to duplicate variable changes for all other prconfig.xml files within your environment.
  6. Restart the environment.