Skip to content

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented May 15, 2023

Related: #6724
Related: #7512

This PR sets the default SSH max timeout to a finite value. Without this setting, SSH connections can hang indefinitely, so in case of any failure, the connection is left as is and causes #7512.

Once we enable the timeout, coder agent will be able to report any troubles with broken agent connections:

2023-05-15 14:24:39.305 [debu]  ssh-server: copy output done  bytes=37025  error=EOF
2023-05-15 14:24:39.305 [warn]  ssh-server: ssh session failed ...
    error= copy error:
               github.com/coder/coder/agent/agentssh.(*Server).startPTYSession
                   /Users/mtojek/code/coder/agent/agentssh/agentssh.go:355
             - EOF

Otherwise, the agent assumes that the connection gets back to life eventually (hence no error trace in logs)

@mtojek mtojek requested a review from kylecarbs May 15, 2023 14:35
@mtojek mtojek self-assigned this May 15, 2023
@mtojek mtojek requested a review from bpmct May 15, 2023 14:35
@mtojek mtojek marked this pull request as ready for review May 15, 2023 14:51
@mtojek mtojek enabled auto-merge (squash) May 15, 2023 14:51
@mtojek mtojek merged commit 049e557 into coder:main May 15, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants