Skip to content

Conversation

carter2000
Copy link

If mongoServer fail to dial server, it will close all sockets that are alive, whether they're currently use or not.
There are two cons:

  • Inflight requests will be interrupt rudely.
  • All sockets closed at the same time, and likely to dial server at the same time. Any occasional fail in the massive dial requests (high concurrency scenario) will make all sockets closed again, and repeat...(It happened in our production environment)

So I think sockets currently in use should closed after idle.

@domodwyer
Copy link

Hi @carter2000

This looks very interesting, and it's something we're interested in merging (if that's OK!) - do you have any tests for this?

Dom

@carter2000
Copy link
Author

@domodwyer
I use the patch two years ago in our production environment, and it works as expected all the time.

@carter2000
Copy link
Author

@fmpwizard
Copy link
Contributor

If you close and reopen the PR, travis will rerun this build and thanks to #462 , your PR should pass all tests on all mongodb versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants