Open ikervagyok opened 3 years ago
SSH can already do this, see the ServerAliveInterval
and TCPKeepAlive
options in ssh_config
.
I know remote builds are kinda high-level, but it still is bad UX. I love the deterministic approach nix's ecosystem takes, and this doesn't feel right, since the only exhausted resource is a ssh/tcp heartbeat.
If you think everybody should solve this on his own, feel free to close this ticket.
p.s.: since it's my first interaction with @edolstra: Thanks for (starting) nix and the ecosystem around it!
I marked this as stale due to inactivity. → More info
Stil relevant to me.
I think we could just pass something like -o ServerAliveInterval=25
to the client process in ssh.c
.
That way will override user configuration, but it's a fairly low value, so I don't think that will be a problem. I don't think it needs to be higher because I agree with @ikervagyok that this is cheap. Especially compared to, like, building, or even the I/O and IPC we normally have for actual log lines that tend to be far more frequent than that.
cc @rickynils?
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2024-08-28-nix-team-meeting-minutes-173/51302/1
Describe the bug Building of some packages on remote hosts fails. The affected packages produce no terminal output for long periods of time and thus the SSH connection gets closed for inactivity.
To Reproduce Steps to reproduce the behavior:
qtwebengine
with-j0
, to force remote buildif your server doesn't produce warnings fast enough, you'll get this error on the server:
And on the client it will fail after its own timeout period.
Expected behavior No manual workarounds on SSH configs for remote building.
nixos-rebuild -j 0
should always work, as long as there is a network connection. Maybe nix could send some sort of heartbeat packets over the same connection?