From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.help Subject: Re: Tramp timeout for currently unreachable connections? Date: Thu, 12 Sep 2024 20:54:54 +0530 Message-ID: <87a5gc6gjd.fsf@gmail.com> References: <87ed5p54dx.fsf@gmail.com> <877cbhj5dg.fsf@gmx.de> 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="10925"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: Michael Albinus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 12 17:26:26 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 1soliE-0002le-LC for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 12 Sep 2024 17:26:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1solhQ-0004vR-10; Thu, 12 Sep 2024 11:25:36 -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 1solhE-0004tB-GC for help-gnu-emacs@gnu.org; Thu, 12 Sep 2024 11:25:24 -0400 Original-Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1solgu-0004T0-Gx for help-gnu-emacs@gnu.org; Thu, 12 Sep 2024 11:25:23 -0400 Original-Received: by mail-pg1-x543.google.com with SMTP id 41be03b00d2f7-7db1f0e1641so468609a12.1 for ; Thu, 12 Sep 2024 08:25:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726154700; x=1726759500; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=e1xjKyaVbgtvWiEA/LimR+gDABMcgjZ4BQGEpeYoE9Y=; b=NAeEeHte+m2VOZLA9HLGV9GshlETRUTEQGOe/VYuxSabCd8BhsbG+tVcMAghhPwhIz 8HDiGW/AVdGCTzSsVt0+jcml0NOOAxwEWh9GGZfBSjKGA2ZxXfPzIZ8nHsm0t+NLSyoo WaR8E/Wabe7nRkKyv0K+eIV8tLpd5mW4q4LkBS8G4ZJwa3DUrkv+kVp8RKnYXIrKkIr6 YnwEIRsPDByAHPVfu4CB/T4XJ+hLw5PG1WCvue4fqwMbjqDwAqXtTkl/HQAdk12XQN4Y DlwZjLiFZYrI1hZ7xVLgGpkKpuvomcFhRA1YCObJGJvcxJmVu8E5yhsaNr/U8Eguf/Zk 67HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726154700; x=1726759500; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=e1xjKyaVbgtvWiEA/LimR+gDABMcgjZ4BQGEpeYoE9Y=; b=b4zafW7Pst0M3qUEjPUZcWpMUCKYZ0DFb11SnxJy8lTYmql/L0XUubdNMu+AisJ0D+ 9gMQdr1hbGPZd+B4MSnkI5qEHPCc1iLi1VBbEfmhdOqWJqrdGBmDGdkR3D3AnwPnuOyL nkvtOFtDCXCKMdjCBv4R0S/8zmat/NdZDrftPEh6QAOSh4ANYmptNwLgGICldUQ4hxeZ IH1YXnisbSMKUOfBKMtX1n1VmnrcjP5UY4HLDIpULbsRIfXTo5wkaWQLYlEcjhZ1u8fg pLT3o6PVqWazx06Lz9gRIsqrWvdPr6MzAXK3c8VtY5lkMAJE8uTrlHxcxtbEdQ/v7xEf 1CSw== X-Gm-Message-State: AOJu0YwgFZH9SInbkUrcrV3Q1BXhmv1oacn4kLPnieQL1pVYl7f0QchR YdfgNOE/RgFHh2S0psJgsWAIuEcKoXhKTn4wVaXlpllT2/Jo6hBg X-Google-Smtp-Source: AGHT+IGkD0U1wCz8/OoMblSv9i8v6ztJobFIeUEvp4TYG5VpaFyLZPXMiq/AKrGwExBttiZWVxTZKA== X-Received: by 2002:a05:6a21:6711:b0:1cc:da34:585e with SMTP id adf61e73a8af0-1cf764c40d2mr4271809637.46.1726154699361; Thu, 12 Sep 2024 08:24:59 -0700 (PDT) Original-Received: from localhost ([1.7.159.70]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-719090c7f01sm4696563b3a.199.2024.09.12.08.24.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 08:24:58 -0700 (PDT) In-Reply-To: <877cbhj5dg.fsf@gmx.de> (Michael Albinus's message of "Thu, 12 Sep 2024 16:47:39 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::543; envelope-from=visuweshm@gmail.com; helo=mail-pg1-x543.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:147961 Archived-At: [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=9A= =E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0= =AF=8D 12, 2024] Michael Albinus wrote: > Visuwesh writes: > >> Hello all, > > Hi Visuwesh, Hello Michael, >> I know that non-essential=3Dt 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. > > Use 'M-x tramp-cleanup-connection'. I can always C-g and execute this command but I would like to do it automagically in my lisp programs so, unfortunately, this isn't exactly an option. Half the time, I forget the freezes are due to Tramp inability to speak with the remote machine too... > Play with user option `tramp-connection-timeout'. If I let-bind tramp-connection-timeout to 1 in the above example, Tramp still tries to talk with the remote machine. :-( Am I misunderstanding your suggestion? Should I be using with-(tramp-)timeout? >> Thank you. > > Best regards, Michael. Thank you for your answers.