Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AndrewsSharvinFindmena opened this issue Feb 27, 2025 · 2 comments
Labels
needs clarification This issue doesn't have enough information to be actionable. Close after 14 days of inactivity

Comments

@AndrewsSharvinFindmena
Copy link

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

@AndrewsSharvinFindmena
Copy link
Author

Image

The connection Number is way too high, but whenever I restart the server it gets normal to 64 connections as you can see

@vkarpov15
Copy link
Collaborator

Without a repro script, there's no way we can reasonably repro this or make any informed recommendations.

@vkarpov15 vkarpov15 added the needs clarification This issue doesn't have enough information to be actionable. Close after 14 days of inactivity label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs clarification This issue doesn't have enough information to be actionable. Close after 14 days of inactivity
Projects
None yet
Development

No branches or pull requests

2 participants