git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Subject: [PATCH 0/2] upload-pack keepalive
Date: Sun, 8 Sep 2013 04:59:15 -0400	[thread overview]
Message-ID: <20130908085915.GA4097@sigill.intra.peff.net> (raw)

I've gotten complaints that cloning from github.com with "-q" will
sometimes abort before sending any data. The problem is that during a
quiet clone, upload-pack may be silent for a long time while preparing
the pack (i.e., the "counting objects" and "compressing" phases).

We have load balancers and reverse proxies sitting in front of the git
machines, and these machines may sometimes think the connection has hung
and drop it, even though if they had waited a few more seconds, the pack
would have started coming.

We mitigated it somewhat by bumping the timeouts on our side, but that's
only one piece of the puzzle. Clients may be going through http proxies
or stateful firewalls on their end, and neither we nor they have any
control.

This series teaches upload-pack to periodically send an empty sideband
data packet when pack-objects is being quiet. That keeps a small amount
of data flowing, and should be backwards compatible. I hand-tested it
against JGit, dulwich (via the mercurial git plugin), libgit2, and old
versions of git, and all worked fine.  It has also been running on
github.com for about a week and a half, and nobody has reported any
problems.

  [1/2]: upload-pack: send keepalive packets during pack computation
  [2/2]: upload-pack: bump keepalive default to 5 seconds

-Peff

             reply	other threads:[~2013-09-08  8:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-08  8:59 Jeff King [this message]
2013-09-08  9:01 ` [PATCH 1/2] upload-pack: send keepalive packets during pack computation Jeff King
2013-09-09  7:45   ` Eric Sunshine
2013-09-08  9:02 ` [PATCH 2/2] upload-pack: bump keepalive default to 5 seconds 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=20130908085915.GA4097@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    /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).