mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
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:
parent
3459eb6c2f
commit
9b4856e7de
|
@ -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: {
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue