Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): set min and max db (oracle) connections #257

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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