Issues with the Shotgun Gem - RuntimeError - ruby

I'm getting this error when I try and run a simple ruby app using shotgun:
Jons-MacBook-Pro:sin jonread$ shotgun simple.rb
== Shotgun/Thin on http://127.0.0.1:9393/
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 127.0.0.1:9393, CTRL+C to stop
/Users/jonread/.rvm/gems/ruby-2.0.0-p195/gems/eventmachine-1.0.0/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/gems/eventmachine-1.0.0/lib/eventmachine.rb:526:in `start_server'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/gems/thin-1.5.0/lib/thin/backends/tcp_server.rb:16:in `connect'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/gems/thin-1.5.0/lib/thin/backends/base.rb:55:in `block in start'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `call'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/gems/thin-1.5.0/lib/thin/backends/base.rb:63:in `start'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/gems/thin-1.5.0/lib/thin/server.rb:159:in `start'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/handler/thin.rb:16:in `run'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/gems/shotgun- 0.9/bin/shotgun:156:in `<top (required)>'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/bin/shotgun:23:in `load'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/bin/shotgun:23:in `<main>'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/jonread/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `<main>'
Any ideas on why this is happening or a quick way to fix it?

Josh Voigt's answer in the comments worked for me.
macbook:cpaphires johnnygoodman$ lsof -i tcp:3000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ruby 24976 johnnygoodman 8u IPv4 0xffffff8020b71fa0 0t0 TCP *:hbci (LISTEN)
macbook:cpaphires johnnygoodman$ kill -9 24976
macbook:cpaphires johnnygoodman$ lsof -i tcp:3000
macbook:cpaphires johnnygoodman$ rails s
=> Booting Thin
=> Rails 3.2.11 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
Which fixed this error:
Listening on 0.0.0.0:3000, CTRL+C to stop
Exiting
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:instart_server'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/thin-1.5.1/lib/thin/backends/tcp_server.rb:16:in connect'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/thin-1.5.1/lib/thin/backends/base.rb:55:inblock in start'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in call'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:inrun_machine'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in run'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/thin-1.5.1/lib/thin/backends/base.rb:63:instart'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/thin-1.5.1/lib/thin/server.rb:159:in start'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/handler/thin.rb:13:inrun'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:268:in start'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.11/lib/rails/commands/server.rb:70:instart'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.11/lib/rails/commands.rb:55:in block in <top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.11/lib/rails/commands.rb:50:intap'
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.11/lib/rails/commands.rb:50:in <top (required)>'
from script/rails:6:inrequire'
from script/rails:6:in `'

Related

Watir - No connection could be made because the target machine actively refused it. - connect(2) for "127.0.0.1" port 9518

I'm a newbie in ruby and watir. I'm trying to run the following lines:
require 'watir-webdriver'
b = Watir::Browser.new :chrome
b.goto 'https://www.google.co.in/'
Chrome is opened, but the browser doesn't get google page. I get the following error:
Errno::ECONNREFUSED: No connection could be made because the target machine actively refused it. - connect(2) for "127.0.0.1" port 9518
from C:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:879:in `initialize'
from C:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:879:in `open'
from C:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:879:in `block in connect'
from C:/Ruby22-x64/lib/ruby/2.2.0/timeout.rb:73:in `timeout'
from C:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:878:in `connect'
from C:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:863:in `do_start'
from C:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:852:in `start'
from C:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:1375:in `request'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.0.0/lib/selenium/webdriver/remote/http/default.rb:103:in `response_for'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.0.0/lib/selenium/webdriver/remote/http/default.rb:57:in `request'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.0.0/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.0.0/lib/selenium/webdriver/remote/bridge.rb:653:in `raw_execute'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.0.0/lib/selenium/webdriver/remote/bridge.rb:631:in `execute'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.0.0/lib/selenium/webdriver/remote/bridge.rb:136:in `get'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.0.0/lib/selenium/webdriver/common/navigation.rb:32:in `to'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/watir-webdriver-0.9.3/lib/watir-webdriver/browser.rb:77:in `goto'
from (irb):17
from C:/Ruby22-x64/bin/irb:11:in `<main>'
I looked for other topics and Q&A but I didn't found bright answer.

Openshift rhc port forward exception

I am trying to open ports so i access my database remotely from my pc
I am running on Ruby200-x64 and when i try to access port forward
rhc port-forward -a appname
i get the following response/error:
Checking available ports ... C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:176:in `malloc': bignum too big to convert into `long' (RangeError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:176:in `malloc_ptr'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:240:in `get_token_information'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:213:in `get_current_user'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:189:in `get_security_attributes_for_user'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:332:in `send_query'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:309:in `send'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent/socket.rb:148:in `send_packet'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent/socket.rb:165:in `send_and_wait'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent/socket.rb:76:in `negotiate!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent/socket.rb:48:in `connect'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/key_manager.rb:179:in `agent'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/key_manager.rb:103:in `each_identity'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/methods/publickey.rb:19:in `authenticate'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:79:in `block in authenticate'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:66:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:66:in `authenticate'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh.rb:211:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.38.4/lib/rhc/commands/port_forward.rb:86:in `run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.38.4/lib/rhc/commands.rb:294:in `execute'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.38.4/lib/rhc/commands.rb:285:in `block (3 levels) in to_commander'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/commander-4.2.1/lib/commander/command.rb:155:in `run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/commander-4.2.1/lib/commander/runner.rb:421:in `run_active_command'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.38.4/lib/rhc/command_runner.rb:72:in `run!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/commander-4.2.1/lib/commander/delegates.rb:8:in `run!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.38.4/lib/rhc/cli.rb:37:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.38.4/bin/rhc:20:in `<top (required)>'
from C:/Ruby200-x64/bin/rhc:23:in `load'
from C:/Ruby200-x64/bin/rhc:23:in `<main>'
It's a bit late but maybe it can help to newcomer.
The solution is, or better say- workaround, to exit the pageant while you port-forward the app. And when done turn it on again if you need to ssh to it.
I found a sort of workaround too, whenever i recieve this error i do the oldest trick in the books, a restart and it works all the times(for now)

tor-privoxy error: connection refused

I'm trying to use tor-privoxy to switch my IP address.
I copied the code from the README, for the most part:
require 'tor-privoxy'
agent ||= TorPrivoxy::Agent.new '127.0.0.1', '', {8123 => 9051} do |agent|
sleep 5
p agent
p "New IP is #{agent.ip}"
end
But when I run it, I got this error:
C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:641:in `rescue in connection_for': connection refused: 127.0.0.1:8123 (Net::HTTP::Persistent::Error)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:589:in `connection_for'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:994:in `request'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mechanize-2.7.3/lib/mechanize/http/agent.rb:259:in `fetch'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mechanize-2.7.3/lib/mechanize.rb:440:in `get'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/tor-privoxy-0.1.1/lib/tor-privoxy/agent.rb:38:in `ip'
from C:/Users/Lap/Dropbox/Programming_Stuff/Ruby_Stuff/Code/tor and socksify stuff/torPrivoxyTest.rb:6:in `block in <main>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/tor-privoxy-0.1.1/lib/tor-privoxy/agent.rb:11:in `call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/tor-privoxy-0.1.1/lib/tor-privoxy/agent.rb:11:in `initialize'
from C:/Users/Lap/Dropbox/Programming_Stuff/Ruby_Stuff/Code/tor and socksify stuff/torPrivoxyTest.rb:3:in `new'
from C:/Users/Lap/Dropbox/Programming_Stuff/Ruby_Stuff/Code/tor and socksify stuff/torPrivoxyTest.rb:3:in `<main>'
[Finished in 8.5s with exit code 1]
What am I doing wrong?
It seems you are using the wrong port. Privoxy uses port 8118 (8123 is polipo). Tor on the other side uses either 9050 (plain Tor) or 9150 (Tor browser bundle). So if you change your settings the communication should work.

chef-shell --solo Chef::Exceptions::PrivateKeyMissing

I am building a recipe where I'm trying to debug how the attributes are being set, but when I execute chef-shell it gives me errors about missing /etc/chef/client.pem, from what I can tell those are generated by chef server, as I'm running in --solo mode shouldn't it skip the requirement for such things? Or am I using chef-shell improperly?
chef-shell --solo -c debug/solo.rb -j debug/nodes.json
loading configuration: debug/solo.rb
Session type: solo
Loading...done.
This is the chef-shell.
Chef Version: 11.14.6
http://www.opscode.com/chef
http://docs.opscode.com/
run `help' for help, `exit' or ^D to quit.
Ohai2u bob#MSIGS70stealth.thalhalla.net!
chef > roles.all
[2014-11-10T13:15:08-06:00] WARN: Failed to read the private key /etc/chef/client.pem: #<Errno::ENOENT: No such file or directory # rb_sysopen - /etc/chef/client.pem>
Chef::Exceptions::PrivateKeyMissing: I cannot read /etc/chef/client.pem, which you told me to use to sign requests!
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/http/authenticator.rb:78:in `rescue in load_signing_key'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/http/authenticator.rb:68:in `load_signing_key'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/http/authenticator.rb:38:in `initialize'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/rest.rb:66:in `new'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/rest.rb:66:in `initialize'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/search/query.rb:34:in `new'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/search/query.rb:34:in `initialize'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/role.rb:184:in `new'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/role.rb:184:in `list'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/shell/model_wrapper.rb:82:in `list_objects'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/shell/model_wrapper.rb:50:in `all'
from (irb):1
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/shell.rb:75:in `block in start'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/shell.rb:74:in `catch'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/lib/chef/shell.rb:74:in `start'
from /home/bob/.rvm/gems/ruby-2.1.0/gems/chef-11.14.6/bin/chef-shell:37:in `<top (required)>'
from /home/bob/.rvm/gems/ruby-2.1.0/bin/chef-shell:23:in `load'
from /home/bob/.rvm/gems/ruby-2.1.0/bin/chef-shell:23:in `<main>'
from /home/bob/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks2.1:15:in `eval'
from /home/bob/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks2.1:15:in `<main>'chef >
That method just isn't supported in solo mode. You can see in the code that is just calls either search or chef_server_rest directly.

capistrano deploy error - newbie

I'm new to ruby and currently having issues deploying with capistrano. below the errors I am getting.
cap aborted!
Operation timed out - connect(2)
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.7.0/lib/net/ssh/transport/session.rb:67:in `initialize'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.7.0/lib/net/ssh/transport/session.rb:67:in `open'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.7.0/lib/net/ssh/transport/session.rb:67:in `block in initialize'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.7.0/lib/net/ssh/transport/session.rb:67:in `initialize'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.7.0/lib/net/ssh.rb:200:in `new'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.7.0/lib/net/ssh.rb:200:in `start'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.0.0/lib/sshkit/backends/netssh.rb:156:in `ssh'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.0.0/lib/sshkit/backends/netssh.rb:109:in `block in _execute'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.0.0/lib/sshkit/backends/netssh.rb:106:in `tap'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.0.0/lib/sshkit/backends/netssh.rb:106:in `_execute'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.0.0/lib/sshkit/backends/netssh.rb:54:in `execute'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.0.0/lib/sshkit/backends/abstract.rb:75:in `within'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/tasks/git.rake:44:in `block (3 levels) in <top (required)>'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.0.0/lib/sshkit/backends/netssh.rb:42:in `instance_exec'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.0.0/lib/sshkit/backends/netssh.rb:42:in `run'
/Users/stefydu/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.0.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => git:create_release => git:update
(See full trace by running task with --trace)
Not a solution, but an explanation with workaround:
Capistrano 3, and with it sshkit, doesn't reuse existing SSH connections, but start a new one for every task (see https://github.com/capistrano/sshkit/issues/34).
Some servers, respectively their firewalls, seem to block new connection requests if they come to fast or if there are too many open connections.
Solutions:
Fix SSHKit/Capistrano to reuse connections
Configure your server/firewall to allow tons of parallel ssh sessions (for a simple rails app about 15)
use my hack below (Disclaimer: no, don't use it):
We're going to extend (monkeypatch) the execute method in gems/sshkit-1.1.0/lib/sshkit/backends/netssh.rb. That can be done via the Capfile:
# Overwrite execute method to avoid timeouts
class SSHKit::Backend::Netssh
def execute(*args)
_execute(*args).success?
rescue Errno::ETIMEDOUT
#tries ||= 0
raise "Nope, no way" if #tries > 5
puts "Timeout. yeah. Try it again (#{#tries})"
sleep 5
#tries += 1
execute(*args)
end
end
This gives the server a chance to breathe...
Capistrano uses a connection pool for SSH now:
https://github.com/capistrano/sshkit/pull/70

Resources