* Request: timeout option for remote operations, esp. "git fetch"
@ 2013-11-07 17:07 H. Peter Anvin
2013-11-10 20:17 ` Eric Wong
0 siblings, 1 reply; 6+ messages in thread
From: H. Peter Anvin @ 2013-11-07 17:07 UTC (permalink / raw)
To: git
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.
-hpa
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Request: timeout option for remote operations, esp. "git fetch"
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
0 siblings, 1 reply; 6+ messages in thread
From: Eric Wong @ 2013-11-10 20:17 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: git
"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?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Request: timeout option for remote operations, esp. "git fetch"
2013-11-10 20:17 ` Eric Wong
@ 2013-11-12 17:00 ` H. Peter Anvin
2013-11-12 17:45 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: H. Peter Anvin @ 2013-11-12 17:00 UTC (permalink / raw)
To: Eric Wong; +Cc: git
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.
-hpa
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Request: timeout option for remote operations, esp. "git fetch"
2013-11-12 17:00 ` H. Peter Anvin
@ 2013-11-12 17:45 ` Junio C Hamano
2013-11-12 18:33 ` H. Peter Anvin
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2013-11-12 17:45 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Eric Wong, git
"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).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Request: timeout option for remote operations, esp. "git fetch"
2013-11-12 17:45 ` Junio C Hamano
@ 2013-11-12 18:33 ` H. Peter Anvin
2013-11-14 8:01 ` Jeff King
0 siblings, 1 reply; 6+ messages in thread
From: H. Peter Anvin @ 2013-11-12 18:33 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Eric Wong, git
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Request: timeout option for remote operations, esp. "git fetch"
2013-11-12 18:33 ` H. Peter Anvin
@ 2013-11-14 8:01 ` Jeff King
0 siblings, 0 replies; 6+ messages in thread
From: Jeff King @ 2013-11-14 8:01 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Junio C Hamano, Eric Wong, git
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-11-14 8:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.