feat(core): Make postgres pool-size configurable (no-changelog) (#7772)

When we upgrade typeorm in #5151, we switched from no pooling to a
default pool-size of 10. This somehow significantly deteriorates the
performance of queries when the application is under load.
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-11-21 18:13:08 +01:00 committed by GitHub
parent 3459eb6c2f
commit 9b4856e7de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -91,6 +91,12 @@ export const schema = {
default: 'public',
env: 'DB_POSTGRESDB_SCHEMA',
},
poolSize: {
doc: 'PostgresDB Pool Size',
format: Number,
default: 2,
env: 'DB_POSTGRESDB_POOL_SIZE',
},
ssl: {
enabled: {

View file

@ -61,6 +61,7 @@ export const getPostgresConnectionOptions = (): PostgresConnectionOptions => ({
type: 'postgres',
...getDBConnectionOptions('postgresdb'),
schema: config.getEnv('database.postgresdb.schema'),
poolSize: config.getEnv('database.postgresdb.poolSize'),
migrations: postgresMigrations,
});