Limit SSH start concurrency
Starting many (90+) SSH connections has caused us some issues such as failed DNS lookups and hitting process file descriptor limits. To mitigate this, patch SSHKit::Backend::Netssh to limit concurrency of connection starts. We'll default to 30 at a time which seems to work without issue, but can be configured via: ``` sshkit: max_concurrent_starts: 10 ```
This commit is contained in:
@@ -224,6 +224,11 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
assert_equal "app@1.2.3.4", @config.ssh_options[:proxy].jump_proxies
|
||||
end
|
||||
|
||||
test "sshkit max concurrent starts" do
|
||||
config = Mrsk::Configuration.new(@deploy.tap { |c| c.merge!(sshkit: { "max_concurrent_starts" => 50 }) })
|
||||
assert_equal 50, @config.sshkit_max_concurrent_starts
|
||||
end
|
||||
|
||||
test "volume_args" do
|
||||
assert_equal ["--volume", "/local/path:/container/path"], @config.volume_args
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user