All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eric Wong <normalperson@yhbt.net>, git@vger.kernel.org
Subject: Re: Request: timeout option for remote operations, esp. "git fetch"
Date: Tue, 12 Nov 2013 10:33:49 -0800	[thread overview]
Message-ID: <5282748D.9000907@zytor.com> (raw)
In-Reply-To: <xmqq1u2likea.fsf@gitster.dls.corp.google.com>

On 11/12/2013 09:45 AM, Junio C Hamano wrote:
> "H. Peter Anvin" <hpa@zytor.com> writes:
> 
>> On 11/10/2013 12:17 PM, Eric Wong wrote:
>>> "H. Peter Anvin" <hpa@zytor.com> wrote:
>>>> When a remote server is unavailable or very slow, some git commands can
>>>> stall out indefinitely.  It would be a very good thing if remote
>>>> commands -- but especially git fetch -- could be given a timeout.
>>>
>>> We've had SO_KEEPALIVE on git and ssh transports since e47a8583 (2011-12-06)
>>> SO_KEEPALIVE for http was added recently (a15d069a) and will be in git 1.8.5
>>>
>>> Do you want a shorter timeout for slow (but still alive) servers?
>>>
>>
>> Yes; note that SO_KEEPALIVE only guarantees that the server is alive at
>> the TCP socket level.  If the server is overloaded but technically alive
>> it may still make no meaningful forward progress.
> 
> 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.

	-hpa

  reply	other threads:[~2013-11-12 18:34 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 [this message]
2013-11-14  8:01         ` Jeff King

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=5282748D.9000907@zytor.com \
    --to=hpa@zytor.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.