help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tramp timeout for currently unreachable connections?


From: Michael Albinus
Subject: Re: Tramp timeout for currently unreachable connections?
Date: Thu, 12 Sep 2024 19:22:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Robert Pluim <rpluim@gmail.com> writes:

Hi Robert,

>>>>>> On Thu, 12 Sep 2024 16:47:39 +0200, Michael Albinus 
>>>>>> <michael.albinus@gmx.de> said:
>
>     Michael> Visuwesh <visuweshm@gmail.com> writes:
>     >> Hello all,
>
>     Michael> Hi Visuwesh,
>
>     >> I know that non-essential=t prevents Tramp from establishing new
>     >> connections but is there a way to make Tramp use a very short timeout
>     >> when trying to connect to a previously established connection that is
>     >> now unreachable?  What I mean is: if I am connected to a remote host 
> via
>     >> a ssh connection /ssh:user@remote: and my internet connection goes 
> down,
>     >> I do not want Tramp trying to fetch remote resources forever.
>
>     Michael> Use 'M-x tramp-cleanup-connection'. Play with user option 
> `tramp-connection-timeout'.
>
> Idle thought: would enabling 'ServerAliveInterval' help at all here?
> (my Tramp connections travel from one side of my desk to the other, so
> I canʼt tell ☺️)

Yes, even the Tramp manual speaks about:

--8<---------------cut here---------------start------------->8---
4.19.2 Detection of session hangouts
------------------------------------

‘ssh’ sessions on the local host hang when the network is down.  TRAMP
cannot safely detect such hangs.  OpenSSH can be configured to kill
such hangs with the following settings in ‘~/.ssh/config’:

     Host *
          ServerAliveInterval 5
          ServerAliveCountMax 2
--8<---------------cut here---------------end--------------->8---

But who reads manuals ...

> Robert

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]