Changing the connection pooling configuration of the EDB PostgreSQL database
You can configure the platform-auth-idp configmap
to change the connection pooling configuration of the PostgreSQL
database. You can override the default values of the pool settings
based on your requirements to optimize the performance of the
database connection. For more information about the connection
pooling parameters, see Table 1.Description of the
connection pooling parameters of the PostgreSQL database.
You can change the connection pooling configuration with one of the following methods:
Connection pooling parameters
| Parameter | Description | Default value |
|---|---|---|
| DB_CONNECT_TIMEOUT | The DB_CONNECT_TIMEOUT parameter is used to set the maximum time (in
seconds) to establish a new database connection. Specify a positive integer with the unit of time
such as hours (h), minutes (m), seconds (s), or milliseconds (ms). |
60000 |
| DB_IDLE_TIMEOUT | The DB_IDLE_TIMEOUT parameter is used to set the maximum time (in seconds)
that the database connection remains idle. Specify a positive integer with the unit of time such as
hours (h), minutes (m), seconds (s), or milliseconds (ms). |
20000 |
| DB_POOL_MAX_SIZE | The DB_POOL_MAX_SIZE parameter is used to set the maximum size of the
database connection pool. |
15 |
| DB_POOL_MIN_SIZE | The DB_POOL_MIN_SIZE parameter is used to set the minimum size of the
database connection pool. |
5 |
| DB_CONNECT_MAX_RETRIES | The DB_CONNECT_MAX_RETRIES parameter is used to set the maximum retry
attempts to establish the database connection. |
5 |
| SEQL_LOGGING | The SEQL_LOGGING parameter is used to enable or disable the connection pool
to log the SQL statement information. You can set to true to enable the connection
pool to log the SQL statements information. |
false |
The following is the sample YAML file with the connection pooling parameters:
apiVersion: v1
kind: ConfigMap
metadata:
name: platform-auth-idp
namespace: <your-foundational-services-namespace>
data:
DB_CONNECT_TIMEOUT: "60000"
DB_IDLE_TIMEOUT: "20000"
DB_POOL_MAX_SIZE: "15"
DB_POOL_MIN_SIZE: "5"
DB_CONNECT_MAX_RETRIES: "5"
SEQL_LOGGING: false
Changing the parameter values with the console
To change the connection pooling parameter values with the console, complete the following steps:
- Log in to the OpenShift Container Platform console as a user with cluster administrator access.
- From the navigation menu, click Workloads > Config Maps.
- Search for
platform-auth-idp. - Click ... > Edit Config Map.
- Change the following attribute values as required:
-
DB_CONNECT_TIMEOUT -
DB_IDLE_TIMEOUT -
DB_POOL_MAX_SIZE -
DB_POOL_MIN_SIZE -
DB_CONNECT_MAX_RETRIES -
SEQL_LOGGING
-
- Click Save.
- From the navigation menu, click Workloads > Deployments.
- Locate
platform-auth-service. - Click ... > Edit Deployment. A window for editing displays.
- Click Save without changes in the configmap to
reload the
platform-auth-servicepods with the updated configmap values. - Click
platform-auth-service. - Wait for some time. Then, check the status of the
platform-auth-servicepods in the Pods pane. The status of all the pods must show as4/4in the Ready field name.
Changing the parameter values with the CLI
To change the connection pooling parameter values with the CLI, complete the following steps:
Replace
<your-foundational-services-namespace> in the
commands with the namespace where you deployed the
foundational services.
-
Log in to your cluster with the
oc logincommand. -
Edit the
platform-auth-idpconfigmap.oc -n <your-foundational-services-namespace> edit configmap platform-auth-idp -
Change the following attribute values as required:
-
DB_CONNECT_TIMEOUT -
DB_IDLE_TIMEOUT -
DB_POOL_MAX_SIZE -
DB_POOL_MIN_SIZE -
DB_CONNECT_MAX_RETRIES -
SEQL_LOGGING
-
-
Save the
platform-auth-idpconfigmap. -
Restart the
platform-auth-servicepods.-
Get the
platform-auth-servicepod names.oc -n <your-foundational-services-namespace> get pods | grep platform-auth-service -
Delete the
platform-auth-servicepod.oc -n <your-foundational-services-namespace> delete pods <pod-name>
-
-
Wait for some time and then check the status of the
platform-auth-servicepods. The status of allplatform-auth-servicepods must show asRunning.oc -n <your-foundational-services-namespace> get pods | grep platform-auth-service