Skip to content

Mongo Db Atlas data READ/WRITE becomes slower after 3 or 4 hours #15278

Open
@AndrewsSharvinFindmena

Description

@AndrewsSharvinFindmena
await mongoose.connect(process.env.MONGO_URL, {
  useNewUrlParser: true,
  useUnifiedTopology: true,
  serverSelectionTimeoutMS: 15000, 
  socketTimeoutMS: 45000, 
});

This is how the code looks,

I am currently using a paid cluster in Atlas. I have monitored the RAM and CPU usage while this happens. The RAM and CPU are perfectly normal, but the data READ/WRITE process becomes slower, and the following event is triggered multiple times before this

mongoose.connection.on('disconnected', async () => {
console.log('MongoDB disconnected, attempting to reconnect...');
});

I am using node js with express

{
"mongoose": "^7.8.6",
"express": "^4.19.2",
}

the node version on the local system is v22.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions