7

I'm using Git 2.9 on Windows. When creating a demo Git training with git daemon, I hit SO_KEEPALIVE error.

@Server
$ git daemon --base-path=. --enable=receive-pack --verbose
[18608] Ready to rumble
[18108] Connection from 127.0.0.1:61111
[18108] unable to set SO_KEEPALIVE on socket: No error
[18108] Extended attributes (16 bytes) exist <host=127.0.0.1>
[18108] Request receive-pack for '/hello-world.git'

@ACommitter
$ git push -u origin "john--01--create-app-saying-hello"

Why is this happening?

sancho21
  • 3,511
  • 1
  • 39
  • 45
  • Does pushing/fetching work against the running instance of the `git-daemon`? To me, the error looks harmless: `SO_KEEPALIVE` enables TCP-level keepalives but with the default settings most OSes in wide use today have for them this mechanism uses insanely large timeouts (like, say, two hours) to send keepalive packets. IOW, this setting is intended to keep persistent *idle* connections alive, and this is really not the use case for Git whose fetching/pushing sessions are short-lived and intense in traffic. So I'd say it's OK to ignore this error. – kostix Jul 19 '16 at 12:21
  • 1
    Oh, I see the word "Hang" in the question's summary. OK, if it hangs, this might be a long-standing bug in GfW, which you can try to [work around](http://stackoverflow.com/a/24461876/720999). Well, I was sure it was somehow fixed since then, but maybe it was really not. – kostix Jul 19 '16 at 12:28
  • If this does not help, feel free to provide an [MCVE](http://stackoverflow.com/help/mcve) in a new issue over there [in the GfW tracker](https://github.com/git-for-windows/git/issues). – kostix Jul 19 '16 at 12:30
  • @kostix you saved my day :) – sancho21 Jul 19 '16 at 12:34
  • OK, from the bottom comments of [this issue (which were filed against msysGit, which was roughly a 1.x series of Git for Windows)](https://github.com/msysgit/git/issues/101), I gather that the fix for this bug is really a workaround -- the one I suggested. So did it work for you? – kostix Jul 19 '16 at 12:43

2 Answers2

3

As of Git for windows 1.9.4, the following command should fix your issue:

git config --global sendpack.sideband false

https://stackoverflow.com/a/24461876/1250319

Community
  • 1
  • 1
Daniel
  • 8,655
  • 5
  • 60
  • 87
  • This did not resolve the issue when running the command: ``` git daemon --export-all --base-path=$(pwd) --reuseaddr --enable=receive-pack $(pwd) ``` using git version 2.12.2.windows.2 – Filip Gajowniczek May 04 '20 at 18:29
0

In addition to the trick suggested by @Daniel i had to do this:

git config --global pack.windowMemory "100m"
git config --global pack.packSizeLimit "100m"
git config --global pack.threads "1" 

to solve the same problem (got it from here).