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

Add a socket timeout option to handle lingering socket requests on transitioning or mixed state nodes [JIRA: CLIENTS-624] #91

Closed
mk1s opened this issue May 28, 2013 · 5 comments

Comments

@mk1s
Copy link

mk1s commented May 28, 2013

There have been several recent problems with nodes in various states transition whether it be physical or service(Riak) being up where the riak-ruby-client will try and connect for upwards of 60s or more, until if fails and tries the next node in the node list. Some sites have been able to fix this by tweaking DNS. Suggested recommendation was to add an option to define a socket level timeout to provide more predictable behavior.

@seancribbs
Copy link
Contributor

Thank you for the bug report @mk1s.

Implementation detail:

  1. Add SO_TIMEOUT option on the PB socket, expose appropriately.
  2. Check whether Excon can support SO_TIMEOUT or other timeout-y options.
  3. Add support for timeout.rb-style SystemExit exceptions in Client#recover_from. (Customer request)

@boosty
Copy link
Contributor

boosty commented Jan 30, 2014

We added PB timeout support to our custom fork of riak-ruby-client:
https://github.com/xing/riak-ruby-client/commit/67f28e1f66e22f79191668aa7d7978d6007f7d89

We will send pull requests soon, but need some time to rebase our fork against the current master.

@sbimikesmullin
Copy link

+1 to get this merged upstream

@Basho-JIRA Basho-JIRA changed the title Add a socket timeout option to handle lingering socket requests on transitioning or mixed state nodes Add a socket timeout option to handle lingering socket requests on transitioning or mixed state nodes [JIRA: CLIENTS-624] Oct 6, 2015
@lukebakken lukebakken added this to the riak-ruby-client-2.4.0 milestone Feb 28, 2016
@lukebakken lukebakken self-assigned this Feb 28, 2016
@boosty
Copy link
Contributor

boosty commented Apr 27, 2016

I created a PR for setting custom socket timeouts: #265

@lukebakken
Copy link
Contributor

Will be resolved by #270

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

No branches or pull requests

6 participants