N
Novu2y ago
dave93

Mongo DB connection - More connections

I use mongo DB in Atlas and have a maximum of 500 connections. When I launch novu in production mode I always get emails from mongo warning me that the connections to my clusters have exceeded 500. Do you have any solutions? Is this normal behaviour ?
13 Replies
mdd
mdd2y ago
hello @dave93.
mdd
mdd2y ago
try to tweak MONGO_MAX_POOL_SIZE env variable
No description
dave93
dave93OP2y ago
Not working, i try with 490 but receive the same emails from Atlas.
mdd
mdd2y ago
what version of Novu do you run? As I remember this variable was added quite recently
dave93
dave93OP2y ago
I will try to download the latest version
Pawan Jain
Pawan Jain2y ago
Thanks @madd.man
dave93
dave93OP2y ago
Not working, received the same emails from Atlas
mdd
mdd2y ago
As far I know - if you just run docker compose with worker, api with MONGO_MAX_POOL_SIZE=490 -> they both can create max 980 connections. @Pawan Jain can you confirm?
dave93
dave93OP2y ago
I use M2 Cluster
dmgarland
dmgarland17mo ago
I noticed that MONGO_MIN_POOL_SIZE is set to 200, so would be good to be able to configure that. I might have a go at opening a PR!
dr.really
dr.really16mo ago
Just ran into this issue on AWS DocumentDB, adding comment to subscribe to this thread
dmgarland
dmgarland16mo ago
GitHub
feat(dal): Configure minimum connection pool size by env var by dmg...
Running Novu self-hosted on Mongo Atlas, we quickly hit problems with the 500 connection limit. The DAL service configures the connection pool based on MONGO_MAX_POOL_SIZE for the upper limit, and ...
Want results from more Discord servers?
Add your server