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

SSHKit needs to re-use connections where possible #69

Closed
seanhandley opened this issue Dec 5, 2013 · 8 comments
Closed

SSHKit needs to re-use connections where possible #69

seanhandley opened this issue Dec 5, 2013 · 8 comments

Comments

@seanhandley
Copy link
Contributor

See capistrano/documentation#57 (comment) for original thread

@tilsammans
Copy link

Pulled down the memoize-backend branch but that does not fix the issue. After the fifth command still:

cap aborted!
Connection refused - connect(2)

like you would expect.

@tilsammans
Copy link

I love what Mina was trying to do by queueing commands into a single connection.

Not suggesting anyone rewrite the Capistrano command backend, mind you. 😸 But it seems better to pool the (costly) connection as much as possible.

@leehambley
Copy link
Member

I suggested trying the following to the last person that ran into this: http://www.cyberciti.biz/faq/linux-unix-reuse-openssh-connection/

I'm not sure if Net::SSH is smart enough to do that, but it seems sane to me.

Maybe that's a way to keep this pooling out of SSHKit, and push it down to the layer where I think it belongs.

(I'm not totally surprised that my branch doesn't work, I don't even know if the memoisation is working.

@leehambley
Copy link
Member

In combination with a .ssh/config in the project directory, that would work for SSHKit.

@tilsammans
Copy link

Inneresting! I am on the go now, but will definitely check that out soon.

Op 5 dec. 2013 om 15:40 heeft Lee Hambley notifications@github.com het volgende geschreven:

In combination with a .ssh/config in the project directory, that would work for SSHKit.


Reply to this email directly or view it on GitHub.

@tilsammans
Copy link

Net::SSH doesn't pick that up, regular ssh does though. It's a nice technique, definitely useful. Unfortunately, not for this particular problem.

@leehambley
Copy link
Member

Thanks for checking Net::SSH, maybe @delano has some idea of of we could
support that in netssh?

Sent from my Nexus 4.
On 5 Dec 2013 20:53, "Joost Baaij" notifications@github.com wrote:

Net::SSH doesn't pick that up, regular ssh does though. It's a nice
technique, definitely useful. Unfortunately, not for this particular
problem.


Reply to this email directly or view it on GitHubhttps://github.com//issues/69#issuecomment-29931616
.

@Kriechi
Copy link

Kriechi commented Sep 17, 2014

I think this can be closed now.
Connection pool is implemented and working.

/cc @leehambley

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

No branches or pull requests

4 participants