Skip to content

Commit

Permalink
Allow configurable connection pool (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjacobson committed Oct 26, 2020
1 parent d4cefa4 commit e79bf15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions creator-node/src/config.js
Expand Up @@ -22,6 +22,12 @@ const config = convict({
env: 'dbUrl',
default: null
},
dbConnectionPoolMax: {
doc: 'Max connections in database pool',
format: 'nat',
env: 'dbConnectionPoolMax',
default: 100
},
ipfsHost: {
doc: 'IPFS host address',
format: String,
Expand Down
2 changes: 1 addition & 1 deletion creator-node/src/models/index.js
Expand Up @@ -13,7 +13,7 @@ const sequelize = new Sequelize(globalConfig.get('dbUrl'), {
logging: globalConfig.get('printSequelizeLogs'),
operatorsAliases: false,
pool: {
max: 100,
max: globalConfig.get('dbConnectionPoolMax'),
min: 5,
acquire: 60000,
idle: 10000
Expand Down

0 comments on commit e79bf15

Please sign in to comment.