git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Request: timeout option for remote operations, esp. "git fetch"

From
Jeff King <peff@peff.net>
Date
Nov 14, 2013, 08:01 UTC
Message-ID
<20131114080122.GA16327@sigill.intra.peff.net>
In-Reply-To
<5282748D.9000907@zytor.com>
On Tue, Nov 12, 2013 at 10:33:49AM -0800, H. Peter Anvin wrote:
Show 9 quoted lines
> > 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
Previous: H. Peter Anvin
Message 6 of 6 in “Request: timeout option for remote operations, esp. "git fetch"”
  1. H. Peter AnvinNov 7, 2013
  2. Eric WongNov 10, 2013
  3. H. Peter AnvinNov 12, 2013
  4. Junio C HamanoNov 12, 2013
  5. H. Peter AnvinNov 12, 2013
  6. Jeff KingNov 14, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.