* [gentoo-user] How do I make connection attempts in Git timeout sooner?
@ 2014-01-16 11:14 Nikos Chantziaras
2014-01-16 22:38 ` Walter Dnes
0 siblings, 1 reply; 3+ messages in thread
From: Nikos Chantziaras @ 2014-01-16 11:14 UTC (permalink / raw
To: gentoo-user
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.)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] How do I make connection attempts in Git timeout sooner?
2014-01-16 11:14 [gentoo-user] How do I make connection attempts in Git timeout sooner? Nikos Chantziaras
@ 2014-01-16 22:38 ` Walter Dnes
2014-01-16 23:29 ` [gentoo-user] " Nikos Chantziaras
0 siblings, 1 reply; 3+ messages in thread
From: Walter Dnes @ 2014-01-16 22:38 UTC (permalink / raw
To: gentoo-user
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.
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gentoo-user] Re: How do I make connection attempts in Git timeout sooner?
2014-01-16 22:38 ` Walter Dnes
@ 2014-01-16 23:29 ` Nikos Chantziaras
0 siblings, 0 replies; 3+ messages in thread
From: Nikos Chantziaras @ 2014-01-16 23:29 UTC (permalink / raw
To: gentoo-user
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-16 23:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-16 11:14 [gentoo-user] How do I make connection attempts in Git timeout sooner? Nikos Chantziaras
2014-01-16 22:38 ` Walter Dnes
2014-01-16 23:29 ` [gentoo-user] " Nikos Chantziaras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox