N
Novu12mo 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
madd
madd12mo ago
hello @dave93.
madd
madd12mo ago
try to tweak MONGO_MAX_POOL_SIZE env variable
No description
dave93
dave9312mo ago
Not working, i try with 490 but receive the same emails from Atlas.
madd
madd12mo ago
what version of Novu do you run? As I remember this variable was added quite recently
dave93
dave9312mo ago
I will try to download the latest version
Pawan Jain
Pawan Jain12mo ago
Thanks @madd.man
dave93
dave9312mo ago
Not working, received the same emails from Atlas
madd
madd12mo 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
dave9311mo ago
I use M2 Cluster
dmgarland
dmgarland11mo 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.really10mo ago
Just ran into this issue on AWS DocumentDB, adding comment to subscribe to this thread
dmgarland
dmgarland10mo 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 ...