From: Jeff King <peff@peff.net>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Eric Wong <normalperson@yhbt.net>,
git@vger.kernel.org
Subject: Re: Request: timeout option for remote operations, esp. "git fetch"
Date: Thu, 14 Nov 2013 03:01:22 -0500 [thread overview]
Message-ID: <20131114080122.GA16327@sigill.intra.peff.net> (raw)
In-Reply-To: <5282748D.9000907@zytor.com>
On Tue, Nov 12, 2013 at 10:33:49AM -0800, H. Peter Anvin wrote:
> > Which means that your original wish may not be granted with
> > SO_KEEPALIVE at all, no? I was wondering if you wanted a forced
> > timeout based on alarm(2), something similar to what you added to
> > git-daemon in 960deccb (git-daemon: timeout, eliminate double DWIM,
> > 2005-10-19).
> >
>
> Yes, something more like that on the client end. SO_KEEPALIVE is better
> than nothing, but not really good enough.
Would it be enough to just use timeout(1), like:
timeout 10m git fetch
That will time the _whole_ fetch operation, which means a legitimately
gigantic but fast fetch would still fail. Setting a shorter timeout only
for periods of inactivity on the network socket would catch killed or
very laggy connections. But it would not catch a server that feeds you
data at a constant but ridiculously slow rate.
-Peff
prev parent reply other threads:[~2013-11-14 8:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 17:07 Request: timeout option for remote operations, esp. "git fetch" H. Peter Anvin
2013-11-10 20:17 ` Eric Wong
2013-11-12 17:00 ` H. Peter Anvin
2013-11-12 17:45 ` Junio C Hamano
2013-11-12 18:33 ` H. Peter Anvin
2013-11-14 8:01 ` Jeff King [this message]
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=20131114080122.GA16327@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hpa@zytor.com \
--cc=normalperson@yhbt.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).