From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: Tramp timeout for currently unreachable connections? Date: Thu, 12 Sep 2024 19:37:15 +0200 Message-ID: <877cbgixis.fsf@gmx.de> References: <87ed5p54dx.fsf@gmail.com> <877cbhj5dg.fsf@gmx.de> <87plp8lwo2.fsf@gmail.com> <875xr06bh1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37188"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Robert Pluim , help-gnu-emacs@gnu.org To: Visuwesh Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 12 19:37:40 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sonlC-0009VC-R5 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 12 Sep 2024 19:37:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sonl5-0005tf-Pv; Thu, 12 Sep 2024 13:37:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sonkw-0005r4-A3 for help-gnu-emacs@gnu.org; Thu, 12 Sep 2024 13:37:26 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sonku-00056t-90 for help-gnu-emacs@gnu.org; Thu, 12 Sep 2024 13:37:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1726162636; x=1726767436; i=michael.albinus@gmx.de; bh=r4KTnF9zy/g0yG9JtPd1vhoGEgpaG0rAKP7w/nNcOeA=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=jmA48U+/txdk6kKmDj5Mjwl1x1Ti34J1UpCvFN3JiWCsUA8r3ArBLDdzCqeA9vyq SvPYVqdbJYnE9ZMv28nPwvlbeCU6wyLDFH89CmGffZTYR2bf/b4sfY304CX1hfgdm B69FgSDp/4Ew5+ClQtNLwu/kaloFg/oY7hEFlOd2IaZJckQU3/OAs+Zq32MN+48er eoVkXXXBoxTwcRhiI8aqrqzOxu6NBEv+UJZ3jEgzcVQb3kGUVSvUCJeey3Qd6Sz0t hXoMbGmzL7Z3mu3VYdA/dMQFNo/D94bADcCFOrZ9uKpygybw4P+235Dfc31UYIy73 sOhX+D9HkF6JOSaDtA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MHXFr-1sk6w92CbR-003hLV; Thu, 12 Sep 2024 19:37:16 +0200 In-Reply-To: <875xr06bh1.fsf@gmail.com> (Visuwesh's message of "Thu, 12 Sep 2024 22:44:18 +0530") X-Provags-ID: V03:K1:ZrXDDBTKyg+joOSX/ydIXtFUacwX0F9So2oMEbjPt9EDBbaLtjV 9qXvt26kMdKSsSr0T4rBBCxsqg5RZEo0nXZ9BN3PdMyOTyIj0Z2TkXG1rXe6VzmG/x3JWaJ ZSdLvh2R00jfADGEkWxjjLtdgNGMfuYRTmVApnksG1cUvrED5J7mx83+U5vL2TkYSQyQhD1 MSfAGxhlI3leDEEH43m6g== UI-OutboundReport: notjunk:1;M01:P0:pIlreszCcYw=;8FG9YP0aYLTiYcxupyiYtkX309x xlJEYeOKmBTnzAqitZnAqTS6mzYwRfLv8HFhiY46ssBqJFpVwGIo8knWhdOqHb5+0ODpZ5UBW 2MvtEAxtZzTcN3Fvtc7u5bECiKLHTSiYHbq0mTaVjkSnUOqzV4aFsb1Z3gMRMfInaPItZjEze pOKXQ5T3dVFdXOnSzO6nSjAHzUIw5uDI2rK31W/JESl60Kd444EwsCJo0Xib7JlYCcAWZuVDi lgs0U7Yddo/VL7EHhWhrXABkGvhr532m8BmnH356t8J1haRx1Bkgiz5tlocod9nzwumlsUyaG 7S6FGBfVOzclbo8oreoRomkBJIqxRHIAQcC6Bkyrcs0i4oPDLKZQWDkRT9h1OdIh80eV2KiVW zm3954qcMmaCQH6DV56saVqeorbrkYe5RpU2hdf4yjxwdkp1I8JsDT6IQlRe3pf5UaTEoDzAU xq320BWrPDiEMs24mAscjk2ANIlTjAuXcZhKy+fQkIInBocdOVGbOFT6pJHEUG4A4YLmJXPIB EegRoPQ+NmD3Q9xn3GOxZwGrpCuy0tDZrZ8gaLFerHmlktryEhIDKNp20ojOgmxglC0het337 p3kIO42f/E7D/KTgZhOL85spyIG0PKtqoFd/subKu7VKbFQMcczawnRh2iBkNoDQyuc4TzC59 ZMj3FZU3u7ucHO1/K9/0zUw0dhdOJohNoZnpsJC08ZJyOfbbUb2o0xXdjosBZDBSoWWmWFcfE 8YMxvxqen/TZeBU6D3v0myS5+SEaA19UoR6qv4iekeIT5bGZ6jEIMBSYry4OzpzCL4XL4Rgx Received-SPF: pass client-ip=212.227.15.15; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147968 Archived-At: Visuwesh 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=CA=BCt tell =E2=98=BA=EF=B8=8F) > 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-direct= ory 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=3Dt 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: "=E2=80=98ssh=E2=80=99= 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. Best regards, Michael.