-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
We upgraded from Sequelize 4.x to 5.x recently and have noticed that we are seeing many more connections to our database since the upgrade. In the graph below you can see that the number of connections (red line) has gone up dramatically since the upgrade on 13 April while the number of servers (green line) has not changed much at all. I see that pooling changed in v5 but it seems that our config should still be valid and that nothing should have changed the number of connections we're seeing. Wondering if anyone else is seeing this because it wasn't an expected behavior.
What are you doing?
pool: {
max: parseInt(config.database.pool.max), //Set to 40
min: parseInt(config.database.pool.min), //Set to 2
idle: 2 * 60 * 1000,
acquire: 15 * 1000
},To Reproduce
Steps to reproduce the behavior:
- Use the same config on sequelize 4.x and 5.x
- Generate a bunch of requests and/or async tasks that require the database
- Compare the number of open database connections
What do you expect to happen?
I would expect the pool to use roughly the same number of database connections
What is actually happening?
The number of database connections goes up by roughly 2.5x
Environment
Dialect:
- postgres
Dialect library version: 7.10.0 (pg)
Database version: 10.6
Sequelize version: 5.6.0
Node Version: 11.12.0
OS: Ubuntu 16.04
