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

Allow configurable connection pool #987

Merged
merged 1 commit into from
Oct 26, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions creator-node/src/config.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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