'Sequelize default connection pool size
Simple question seeking a simple answer.
What is the default connection pool size for a sequelize managed pg database?
The docs don't say anything about this, however they do mention options for setting min/max idle times.
Solution 1:[1]
The default pooling configuration is:
{
max: 5,
min: 0,
idle: 10000,
acquire: 60000,
evict: 1000
}
So the default min. amount of pool connections is 0 and the default max. amount of pool connections is 5.
Source: sequelize/src/dialects/abstract/connection-manager.js:L34
Solution 2:[2]
Go to connection-manager.js file and you'll find this
const defaultPoolingConfig = {
max: 5,
min: 0,
idle: 10000,
acquire: 10000,
evict: 10000,
handleDisconnects: true
};
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | farhan |