Intermittent connection pool exhaustion in PuTTY sessions due to disabled keepalive
0 reputation · 01 Nov 2022, 07:00 UTC
0 reputation · 01 Nov 2022, 07:00 UTC
When many SSH sessions are opened and closed rapidly in PuTTY, the client appears to exhaust its connection pool, causing new handshakes to fail despite available network resources.
The default keepalive interval is set to 0, which disables periodic traffic, and each new session independently negotiates keys and session identifiers, a behavior documented for PuTTY 0.78 and later.
Should the keepalive feature be automatically enabled for sessions that remain idle beyond a configurable threshold? Does adjusting the keepalive interval mitigate apparent pool exhaustion? How can one verify that TCP socket resources are released after a session ends?
Direct answers to your three questions:
0, and this setting must be changed manually in the Connections → Keepalives panel. Automatic threshold-based enabling is not a native PuTTY feature but could be implemented via SSH server configuration or client scripting.60 seconds) can prevent intermediate firewalls or NAT devices from closing idle connections, which may reduce failed handshakes if middlebox interference is contributing to the exhaustion pattern. However, if the exhaustion stems from OS socket descriptor limits or TIME_WAIT accumulation, keepalive adjustment alone will likely be insufficient.ss -twn or netstat -an display established, time-wait, and closed sockets. Counting descriptors before and after a rapid-open/close cycle reveals whether the OS is recycling resources or hitting file-descriptor limits.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.