Skip to content

Commit

Permalink
chore(ci): set min and max db (oracle) connections (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Feb 27, 2024
1 parent 162a131 commit 44e45e3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ jobs:
file: backend/openshift.deploy.yml
verification_path: /actuator/health
parameters:
-p MIN_REPLICAS=1
-p MAX_REPLICAS=1
-p MIN_REPLICAS=1
-p DB_POOL_MAX_SIZE=1
-p AWS_COGNITO_ISSUER_URI=https://cognito-idp.${{ vars.AWS_REGION }}.amazonaws.com/${{ vars.VITE_USER_POOLS_ID }}
- name: frontend
file: frontend/openshift.deploy.yml
Expand Down
10 changes: 10 additions & 0 deletions backend/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ parameters:
- name: DB_POOL_MAX_LIFETIME
description: Maximum lifetime of a connection in the pool.
value: "1800000"
- name: DB_POOL_MAX_SIZE
description: Maximum number of connections per pod
value: "3"
- name: DB_POOL_MIN_IDLE
description: Minimum number of connections per pod
value: "1"
- name: RESULTS_ENV_OPENSEARCH
description: Environment name for OpenSearch. # One of: development, test, production
required: true
Expand Down Expand Up @@ -122,6 +128,10 @@ objects:
value: ${DB_POOL_CONN_TIMEOUT}
- name: DB_POOL_IDLE_TIMEOUT
value: ${DB_POOL_IDLE_TIMEOUT}
- name: DB_POOL_MAX_SIZE
value: ${DB_POOL_MAX_SIZE}
- name: DB_POOL_MIN_IDLE
value: ${DB_POOL_MIN_IDLE}
- name: DB_POOL_MAX_LIFETIME
value: ${DB_POOL_MAX_LIFETIME}
- name: RESULTS_ENV_OPENSEARCH
Expand Down
4 changes: 2 additions & 2 deletions backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ spring.datasource.hikari.idleTimeout = ${DB_POOL_IDLE_TIMEOUT:45000}
spring.datasource.hikari.maxLifetime = ${DB_POOL_MAX_LIFETIME:30000}
spring.datasource.hikari.keepaliveTime = 30000
spring.datasource.hikari.poolName = NrResultsDbPool
spring.datasource.hikari.minimumIdle = 1
spring.datasource.hikari.maximumPoolSize = 3
spring.datasource.hikari.minimumIdle = ${DB_POOL_MIN_IDLE:1}
spring.datasource.hikari.maximumPoolSize = ${DB_POOL_MAX_SIZE:3}
spring.jpa.database-platform = org.hibernate.dialect.OracleDialect
spring.jpa.show-sql = true

Expand Down

0 comments on commit 44e45e3

Please sign in to comment.