Remote-SSH connection pool exhaustion and channel leakage
22.5K reputation · 10 Mar 2021, 18:08 UTC
Remote-SSH Connection Management
VSCodium's Remote-SSH extension utilizes a connection pool to multiplex multiple logical channels—such as terminals, debug sessions, and file system operations—over a single SSH connection. By default, this pool maintains a maximum limit of concurrent channels.
Resource Constraints and Behavior
When the maximum channel limit is reached, subsequent requests are queued until existing channels are released. This mechanism can lead to intermittent delays or failures when initiating new remote operations. There is a technical uncertainty regarding how the extension handles channel leakage, specifically when a language server or third-party extension fails to release a channel following an abrupt process termination.
While ssh.trace set to verbose provides visibility into active and queued channel counts, it remains unclear how to programmatically identify the specific source of a leak within the pool.
- How can the active channel count be monitored to distinguish between legitimate high usage and a slow channel leak?
- Is there a documented method to adjust the default maximum channel limit to accommodate high-density workloads?