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:
@@ -157,6 +157,10 @@ class Mrsk::Configuration
|
||||
end
|
||||
|
||||
|
||||
def sshkit_max_concurrent_starts
|
||||
raw_config.sshkit["max_concurrent_starts"] if raw_config.sshkit.present?
|
||||
end
|
||||
|
||||
def healthcheck
|
||||
{ "path" => "/up", "port" => 3000, "max_attempts" => 7 }.merge(raw_config.healthcheck || {})
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user