diff --git a/creator-node/src/config.js b/creator-node/src/config.js index 2e9ab4dce7c..00da32de769 100644 --- a/creator-node/src/config.js +++ b/creator-node/src/config.js @@ -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, diff --git a/creator-node/src/models/index.js b/creator-node/src/models/index.js index 6cc6fd6e674..0dc5684b7fd 100644 --- a/creator-node/src/models/index.js +++ b/creator-node/src/models/index.js @@ -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