{"thread":{"id":"37661","subject":"Concurrent fetches and pushes","startedAt":"2014-10-01T21:51:12Z","lastAt":"2014-10-01T21:51:12Z","messageCount":1,"participants":["Fernando Correia"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"250132","messageId":"CAH8bp3K01Bkr939S62zYjrtRKeotJoGw+4pEnuE8MXtVk_DbrA@mail.gmail.com","threadId":"37661","inReplyTo":null,"subject":"Concurrent fetches and pushes","fromName":"Fernando Correia","fromEmail":"fernandoacorreia@gmail.com","sentAt":"2014-10-01T21:51:12Z","receivedAt":"2014-10-01T21:51:12Z","isPatch":false,"sender":{"key":"fernandoacorreia@gmail.com","avatar":null},"body":"Are concurrent pushes and fetches to the same repository via HTTP supported?\n\nConsidering this architecture:\n\ngit --(smart HTTP protocol)--> apache -> git-http-backend\n\ngit version is 2.1.1 on client and server.\n\nMultiple clients are fetching from and pushing to the same\nrepositories, sometimes concurrently.\n\nSome pushes are failing with this error:\n\nTo https://username:password@host.com/projectrepos/project.git\n+ 3711f16...0bdfbc5 master -> master (forced update)\nerror: RPC failed; result=52, HTTP code = 0\nfatal: The remote end hung up unexpectedly\n\nremote: error: failed to lock refs/heads/master\nTo https://username:password@host.com/projectrepos/project.git\n! [remote rejected] master -> master (failed to lock)\nerror: failed to push some refs to\n'https://username:password@host.com/projectrepos/project.git'\n\nIt says it failed to lock but we're not sure why. Error code 52 means\nit \"got nothing\".\n\nOn the server logs, there are errors like these (I'm not sure if\ncaused by fetch or push requests):\n\nerror: Ref refs/heads/master is at\nf38a8a79752eac8a53fd195bc37fc56c0faf5cfa but expected\na586117cd41604b8b2cb9776a98715c591071ad1\n\nerror: Ref refs/heads/master is at\n6e1108c108ae464a37cbb3ccc84db934656cbcb4 but expected\nf38a8a79752eac8a53fd195bc37fc56c0faf5cfa\n\nfatal: git upload-pack: not our ref f38a8a79752eac8a53fd195bc37fc56c0faf5cfa\n\nerror: Ref refs/heads/master is at\n6e1108c108ae464a37cbb3ccc84db934656cbcb4 but expected\nf38a8a79752eac8a53fd195bc37fc56c0faf5cfa\n\nerror: Ref refs/heads/master is at\ncc853c06962b3562e46cfefb3986abef914809b5 but expected\n6e1108c108ae464a37cbb3ccc84db934656cbcb4\n\nThese errors don't happen when accessing a repository on the\nfilesystem instead of via HTTP transport.\n\nDoes git support concurrent fetch and push operations?\n\nAre there any restrictions to doing that via the HTTP backend?\n"}]}