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

Mongoose Connection Spike when using with Mongo DB Atlas #10318

Closed
Ayushk93 opened this issue Jun 2, 2021 · 2 comments
Closed

Mongoose Connection Spike when using with Mongo DB Atlas #10318

Ayushk93 opened this issue Jun 2, 2021 · 2 comments
Labels
needs clarification This issue doesn't have enough information to be actionable. Close after 14 days of inactivity

Comments

@Ayushk93
Copy link

Ayushk93 commented Jun 2, 2021

Hi Team,

We are using Mongoose latest version with Mongo DB Atlas and Nest JS. We have tried below connection options for creating connection uri:

return {
      uri:
        process.env.MONGO_DB_URL +
        '?retryWrites=false&w=majority&authSource=admin&readPreference=primary',
      useNewUrlParser: true,
      poolSize: 3,
      socketTimeoutMS: 30000,
      autoReconnect: false,
      connectTimeoutMS: 5000,
      maxIdleTimeMS: 5000,
      minPoolSize: 1,
      maxPoolSize: 1,
      keepAlive: false,
      keepAliveInitialDelay: 3000,
    };

But our connection count is getting high with every request. Please help us, we have multi tenant architecture.

@IslandRhythms
Copy link
Collaborator

#10280

@vkarpov15 vkarpov15 added needs clarification This issue doesn't have enough information to be actionable. Close after 14 days of inactivity and removed duplicate labels Jun 4, 2021
@vkarpov15
Copy link
Collaborator

Without a code sample that demonstrates the issue you're seeing, we won't be able to make any progress on this. Your connection options look fine, but without a repro script we won't be able to provide any advice.

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

3 participants