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
hello @dave93.
try to tweak
MONGO_MAX_POOL_SIZE
env variableNot working, i try with 490 but receive the same emails from Atlas.
what version of Novu do you run? As I remember this variable was added quite recently
I will try to download the latest version
Thanks @madd.man
Not working, received the same emails from Atlas
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?Let me check
@dave93.
What is your cluster tier?
https://www.mongodb.com/docs/atlas/reference/atlas-limits/#connection-limits-and-cluster-tier
I use M2 Cluster
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!Just ran into this issue on AWS DocumentDB, adding comment to subscribe to this thread
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 ...