From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8147B138247 for ; Thu, 16 Jan 2014 23:29:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DA08FE0B45; Thu, 16 Jan 2014 23:29:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CDD93E076D for ; Thu, 16 Jan 2014 23:29:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id E21E733F895 for ; Thu, 16 Jan 2014 23:29:48 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Flag: NO X-Spam-Score: 0.817 X-Spam-Level: X-Spam-Status: No, score=0.817 tagged_above=-999 required=5.5 tests=[AWL=-1.371, DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.325, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=no Received: from smtp.gentoo.org ([IPv6:::ffff:127.0.0.1]) by localhost (smtp.gentoo.org [IPv6:::ffff:127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YjnZqeqi7u_L for ; Thu, 16 Jan 2014 23:29:42 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 604B233F892 for ; Thu, 16 Jan 2014 23:29:40 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W3wNV-0000ug-2x for gentoo-user@gentoo.org; Fri, 17 Jan 2014 00:29:37 +0100 Received: from athedsl-345292.home.otenet.gr ([85.72.204.106]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Jan 2014 00:29:37 +0100 Received: from realnc by athedsl-345292.home.otenet.gr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Jan 2014 00:29:37 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Nikos Chantziaras Subject: [gentoo-user] Re: How do I make connection attempts in Git timeout sooner? Date: Fri, 17 Jan 2014 01:29:26 +0200 Organization: Lucas Barks Message-ID: References: <20140116223813.GA19187@waltdnes.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: athedsl-345292.home.otenet.gr User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: <20140116223813.GA19187@waltdnes.org> X-Archives-Salt: b871a386-55b1-4fcd-bf26-e82bfbfb7d62 X-Archives-Hash: e43fa04ce30dd3efdc3c2a03f9a55cfe On 17/01/14 00:38, Walter Dnes wrote: > On Thu, Jan 16, 2014 at 01:14:28PM +0200, Nikos Chantziaras wrote >> With overlays.gentoo.org being down, by update script takes a long time >> to complete. Instead of Git telling me immediately that it can't connect >> to the server, it just sits there for whole minutes doing nothing before >> it decides to abort. >> >> This is extremely frustrating. Is there a way to change this behavior of >> Git? Other software doesn't seem to have this problem (for example if I >> browse to a web server that's down, the browser immediately tells me >> that it can't connect, rather going for a coffee break first.) > > Unfortunately, the git client itself can't do this, due to "keepalive" > code built into git. See > http://git.661346.n2.nabble.com/Request-timeout-option-for-remote-operations-esp-quot-git-fetch-quot-td7598943.html > > About the only thing you can do is use the "timeout" command to launch > git as a subcommand, e.g. > > timeout 1m git fetch > > The downside of this approach is that if the git server is feeding > data very slowly, your git client gets killed after the time limit, even > if it's 90% of the way through the download. This is weird. How can you "keep alive" something that's dead from the beginning? :-/ AFAIK, "keep alive" in networking refers to keeping an active connection alive. Here, a connection can't even be established in the first place. The server is down.