all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Visuwesh <visuweshm@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Robert Pluim <rpluim@gmail.com>,  help-gnu-emacs@gnu.org
Subject: Re: Tramp timeout for currently unreachable connections?
Date: Thu, 12 Sep 2024 23:15:18 +0530	[thread overview]
Message-ID: <87wmjg4vgx.fsf@gmail.com> (raw)
In-Reply-To: <877cbgixis.fsf@gmx.de> (Michael Albinus's message of "Thu, 12 Sep 2024 19:37:15 +0200")

[வியாழன் செப்டம்பர் 12, 2024] Michael Albinus wrote:

> Visuwesh <visuweshm@gmail.com> writes:
>
> Hi Visuwesh,
>
>>> 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 ☺️)
>
>> I have it set to 100 but it doesn't help much.  I don't think I am
>> describing my problem well.  I have the following function
>>
>>     (defun vz/stb--buffer-annotation (buffer)
>>       (let ((case-fold-search nil))
>>         (pcase (buffer-name buffer)
>>           ((rx bos (1+ anychar) "<" (+ (not ">")) ">")
>>               (let ((non-essential t))
>>                 (vz/with-when (buffer-file-name buffer)
>>                   (abbreviate-file-name it)))
>>               ;; (let ((non-essential t))
>>               ;;   (vz/with-when (vz/file-visiting-buffer-p buffer)
>>               ;;     (abbreviate-file-name it)))
>>               )
>>           ((rx bos "*" (or "shell" "ssh") (? "-"))
>>               (let ((non-essential t))
>>                 (abbreviate-file-name (buffer-local-value 'default-directory buffer))))
>>           (_ (vz/buffer-annotation buffer)))))
>>
>> that returns an annotation string for my C-x b replacement.  If Tramp
>> already knows the connection is dead, non-essential=t signals Tramp to
>> not to bother to open a new connection.  I would like a similar variable
>> to make Tramp give up after a few seconds if it gets no reply from the
>> remote server in the case of connections that are no longer reachable.
>
> I've quoted the Tramp manual in my answer to Robert: "‘ssh’ sessions on
> the local host hang when the network is down.  TRAMP cannot safely
> detect such hangs."
>
> The reason is, that Tramp just sees a server, which doesn't respond to a
> request. It doesn't know the reason for that non-responsiveness. The
> request could be, for example, to copy a file of dozens or hundreds MBs
> (yes, I've seen this in the wild). This can take a long time, and it
> would be intended by the user. There is no good timeout value to stop
> waiting the the response.

Thanks, so the only realistic option is to adjust those ssh variables to
a sensible value then.  I was under the impression that there existed a
variable or function that would force Tramp to use a specific timeout
value but in retrospect, I see that it would be unreliable.  Thank you
once again for pointing to the manual making me realise my initial
misunderstanding of the ssh variables.

> Best regards, Michael.

Thank you for your patience in answering my questions!



  reply	other threads:[~2024-09-12 17:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12 14:32 Tramp timeout for currently unreachable connections? Visuwesh
2024-09-12 14:47 ` Michael Albinus
2024-09-12 15:24   ` Visuwesh
2024-09-12 17:27     ` Michael Albinus
2024-09-12 15:27   ` Robert Pluim
2024-09-12 17:14     ` Visuwesh
2024-09-12 17:37       ` Michael Albinus
2024-09-12 17:45         ` Visuwesh [this message]
2024-09-12 17:22     ` Michael Albinus
2024-09-12 17:35       ` Visuwesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmjg4vgx.fsf@gmail.com \
    --to=visuweshm@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=rpluim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.