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

Idle Connection is ignored #153

Open
amirhalatzi opened this issue Jul 11, 2013 · 3 comments
Open

Idle Connection is ignored #153

amirhalatzi opened this issue Jul 11, 2013 · 3 comments
Labels
Milestone

Comments

@amirhalatzi
Copy link

If the connection t/o, or is actively reset, it is not recoverable.

Example scenario:

  1. Open a pool of 10 connections
  2. Have them idle for a long period of time (1 hour is enough for Windows to close them)
  3. Perform a Riak action
    The result: I get 'Unable to access functioning Riak node'.

I'd expect it to detect it before using the network socket, and silently re-opening it.

@peschkaj
Copy link
Contributor

Directly related to #1, #9, and #157

@taliesins
Copy link

Half open connections are causing this issue. So if we are going to use connection pooling then we should close connections when they:

  • timeout
  • socket exception occurs

For an implementation please see:
https://github.com/taliesins/CorrugatedIron/blob/master/CorrugatedIron/Comms/RiakConnectionPool.cs
https://github.com/taliesins/CorrugatedIron/blob/master/CorrugatedIron/Comms/RiakPbcSocket.cs

@peschkaj
Copy link
Contributor

Could you send over a pull request to make review easier?

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

No branches or pull requests

4 participants