Skip to content

Comments

Avoid interrupt inflight requests after a new socket connect failed#481

Open
carter2000 wants to merge 1 commit intogo-mgo:v2-unstablefrom
carter2000:closeidle_v2
Open

Avoid interrupt inflight requests after a new socket connect failed#481
carter2000 wants to merge 1 commit intogo-mgo:v2-unstablefrom
carter2000:closeidle_v2

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.

@carter2000
Copy link
Author

#437

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.

1 participant