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 increase #6987

Closed
supersujj opened this Issue Sep 6, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@supersujj
Copy link

supersujj commented Sep 6, 2018

Do you want to request a feature or report a bug?
bug
What is the current behavior?
one nodejs app have two mongo conn pool,one mode is readPreference:"primary",one mode is readPreference:"secondaryPreferred"
poolSize=100,connectTimeoutMS=10000,socketTimeoutMS=45000.

listen mongoose event,for example:connecting,connected,left,joined,disconnected

the issue is continued have left,joined event,have can not see disconnected event,
and use linux command "netstat -na|grep ESTABLISHED | grep 27017 |wc -l",it can see the connection increase
If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
now we found something as below:
1.after upgrade mongoose version to 5.2.12 it will not see the connection increase.

and now we have 2 questions:
1.mongoose version 5.0.x is it have some bug lead to connection increase?
2.mongoose have some way to monitor the connection pool status?
Please mention your node.js, mongoose and MongoDB version.
node version : 8.9.1
mongoose version: 5.0.3
mongodb sharding cluster version: 3.4.9

@vkarpov15

This comment has been minimized.

Copy link
Collaborator

vkarpov15 commented Sep 9, 2018

There were a few connection pool issues fixed in 5.2.9, your issue sounds a lot like #6670 . If upgrading fixes your problem, you should upgrade.

  1. Just the left and joined events right now.

@vkarpov15 vkarpov15 closed this Sep 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment