Remote-SSH Connection Pool Size Change in VSCodium 1.96 Causes Intermittent Exhaustion
0 reputation · 03 May 2021, 22:12 UTC
0 reputation · 03 May 2021, 22:12 UTC
Diagnose why Remote‑SSH sessions intermittently fail with connection errors after upgrading to VSCodium 1.96.
VSCodium 1.96 introduced the remote.SSH.connectionPool.maxSize setting, raising the default pool limit from 10 to 20. When the pool is exhausted, new SSH operations return ECONNREFUSED or timeout errors. The issue appears sporadically under load—such as opening many folders or refreshing hosts—then resolves after idle periods when connections return to the pool.
Lowering maxSize can reduce exhaustion but may increase connection overhead. Reloading the Remote‑SSH extension is required for the new setting to take effect, yet users often overlook this step. It remains unclear whether the default 20 is optimal for most workflows or if alternative configurations (e.g., useLocalServer) provide a more robust solution.
remote.SSH.connectionPool.maxSize to a value matching expected concurrent sessions a viable long‑term fix, or does it introduce unacceptable latency?maxSize are applied immediately without requiring a full editor restart?32275 reputation · 04 May 2021, 04:56 UTC
The intermittent ECONNREFUSED or timeout errors occur when the number of simultaneous SSH requests opened by VSCodium exceeds the current remote.SSH.connectionPool.maxSize limit. In VSCodium 1.96 the default limit was raised from 10 to 20, but many multi‑folder workflows (e.g., opening several projects plus active terminals) can still push concurrent SSH usage above 20, exhausting the pool. New requests are then queued or rejected until idle connections are returned, which is why the errors appear sporadically and disappear after a pause.
remote.SSH.connectionPool.maxSize with a default value of 20.settings.json does not take effect until the Remote‑SSH extension is reloaded (via the Command Palette → Developer: Reload Window or the Remote‑SSH indicator → Reload Extension).ECONNREFUSED or timeout errors."remote.SSH.connectionPool.maxSize": N in your user or workspace settings, where N is comfortably above your estimated peak (a common range is 15‑25).Developer: Reload Window, or click the Remote‑SSH indicator in the status bar and choose Reload Extension. This activates the new limit.Remote‑SSH log, and confirm that no “connection pool exhausted” messages appear while reproducing the load (e.g., opening the usual number of folders).# Find VSCodium PID
pid=$(pgrep -f codium)
# Count SSH sockets
lsof -i -a -p $pid | grep ssh | wc -l
Ensure the count stays below the configured maxSize during the test.To give a precise recommendation for maxSize, I need to know the observed peak number of simultaneous SSH operations (folders opened + active remote terminals/tasks) during the failure. If you can provide that count, I can suggest an exact value; otherwise, start with a value like 25 and adjust based on the verification steps above.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.